-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.qml
More file actions
177 lines (137 loc) · 4.58 KB
/
shell.qml
File metadata and controls
177 lines (137 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
//@ pragma UseQApplication
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "components"
ShellRoot {
id: root
Variants {
model: Quickshell.screens
PanelWindow {
id: barWindow
property var modelData
screen: modelData
signal closeAllPopups()
// Listen to Hyprland events to close popups when focus changes
Connections {
target: Hyprland
function onRawEvent(event) {
// Close popups when active window changes or layer closes
if (event.name === "activewindow" || event.name === "activewindowv2") {
barWindow.closeAllPopups()
}
}
}
anchors {
top: true
left: true
right: true
}
implicitHeight: 34
color: Theme.colBg
margins {
top: 0
bottom: 0
left: 0
right: 0
}
Rectangle {
anchors.fill: parent
color: Theme.colBg
RowLayout {
anchors.fill: parent
spacing: 0
// Left padding
Item { width: 12 }
// Workspaces
WorkspaceBar {
Layout.preferredHeight: parent.height
}
// Separator
Rectangle {
Layout.preferredWidth: 1
Layout.preferredHeight: 16
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 8
Layout.rightMargin: 8
color: Theme.colMuted
}
// Window info (layout + title)
WindowInfo {
Layout.preferredHeight: parent.height
Layout.preferredWidth: 300
}
// Left spacer
Item { Layout.fillWidth: true }
// Center: Date and Weather
CenterInfo {
barWindow: barWindow
}
// Right spacer
Item { Layout.fillWidth: true }
// Slack indicator
SlackWidget {}
// WhatsApp indicator
WhatsAppWidget {}
Separator {}
// System stats
CpuWidget {
Layout.rightMargin: 8
}
Separator {}
MemoryWidget {
Layout.rightMargin: 8
}
Separator {}
//DiskWidget {
// Layout.rightMargin: 8
//}
//Separator {}
VolumeWidget {
Layout.rightMargin: 8
}
Separator {}
BatteryWidget {
Layout.rightMargin: 8
}
Separator {}
// WiFi indicator
WifiWidget {
barWindow: barWindow
}
// Bluetooth indicator
BluetoothWidget {
barWindow: barWindow
}
// Power profile
PowerProfileWidget {
barWindow: barWindow
}
Separator {}
// Clock
Clock {}
Separator {}
// Power menu
PowerWidget {
barWindow: barWindow
}
// Right padding
Item { width: 8 }
}
// Click overlay to close popups - sits on top but propagates clicks
MouseArea {
anchors.fill: parent
propagateComposedEvents: true
onClicked: (mouse) => {
barWindow.closeAllPopups()
mouse.accepted = false
}
}
}
}
}
}