1- import Quickshell
2- import Quickshell.Io
3- import Caelestia
41import qs.components.misc
5- import qs.services
62import qs.modules.controlcenter
3+ import qs.services
4+ import Caelestia
5+ import Quickshell
6+ import Quickshell.Io
77
88Scope {
99 id: root
1010
1111 property bool launcherInterrupted
1212 readonly property bool hasFullscreen: Hypr .focusedWorkspace ? .toplevels .values .some (t => t .lastIpcObject .fullscreen === 2 ) ?? false
1313
14- // qmllint disable unresolved-type
1514 CustomShortcut {
16- // qmllint enable unresolved-type
1715 name: " controlCenter"
1816 description: " Open control center"
1917 onPressed: WindowFactory .create ()
2018 }
2119
22- // qmllint disable unresolved-type
2320 CustomShortcut {
24- // qmllint enable unresolved-type
2521 name: " showall"
2622 description: " Toggle launcher, dashboard and osd"
2723 onPressed: {
@@ -32,9 +28,7 @@ Scope {
3228 }
3329 }
3430
35- // qmllint disable unresolved-type
3631 CustomShortcut {
37- // qmllint enable unresolved-type
3832 name: " dashboard"
3933 description: " Toggle dashboard"
4034 onPressed: {
@@ -45,9 +39,7 @@ Scope {
4539 }
4640 }
4741
48- // qmllint disable unresolved-type
4942 CustomShortcut {
50- // qmllint enable unresolved-type
5143 name: " session"
5244 description: " Toggle session menu"
5345 onPressed: {
@@ -58,9 +50,7 @@ Scope {
5850 }
5951 }
6052
61- // qmllint disable unresolved-type
6253 CustomShortcut {
63- // qmllint enable unresolved-type
6454 name: " launcher"
6555 description: " Toggle launcher"
6656 onPressed: root .launcherInterrupted = false
@@ -73,17 +63,14 @@ Scope {
7363 }
7464 }
7565
76- // qmllint disable unresolved-type
7766 CustomShortcut {
78- // qmllint enable unresolved-type
7967 name: " launcherInterrupt"
8068 description: " Interrupt launcher keybind"
8169 onPressed: root .launcherInterrupted = true
8270 }
8371
84- // qmllint disable unresolved-type
72+
8573 CustomShortcut {
86- // qmllint enable unresolved-type
8774 name: " sidebar"
8875 description: " Toggle sidebar"
8976 onPressed: {
@@ -94,9 +81,7 @@ Scope {
9481 }
9582 }
9683
97- // qmllint disable unresolved-type
9884 CustomShortcut {
99- // qmllint enable unresolved-type
10085 name: " utilities"
10186 description: " Toggle utilities"
10287 onPressed: {
@@ -108,6 +93,8 @@ Scope {
10893 }
10994
11095 IpcHandler {
96+ target: " drawers"
97+
11198 function toggle (drawer : string ): void {
11299 if (list ().split (" \n " ).includes (drawer)) {
113100 if (root .hasFullscreen && [" launcher" , " session" , " dashboard" ].includes (drawer))
@@ -123,19 +110,19 @@ Scope {
123110 const visibilities = Visibilities .getForActive ();
124111 return Object .keys (visibilities).filter (k => typeof visibilities[k] === " boolean" ).join (" \n " );
125112 }
126-
127- target: " drawers"
128113 }
129114
130115 IpcHandler {
116+ target: " controlCenter"
117+
131118 function open (): void {
132119 WindowFactory .create ();
133120 }
134-
135- target: " controlCenter"
136121 }
137122
138123 IpcHandler {
124+ target: " toaster"
125+
139126 function info (title : string , message : string , icon : string ): void {
140127 Toaster .toast (title, message, icon, Toast .Info );
141128 }
@@ -151,7 +138,5 @@ Scope {
151138 function error (title : string , message : string , icon : string ): void {
152139 Toaster .toast (title, message, icon, Toast .Error );
153140 }
154-
155- target: " toaster"
156141 }
157142}
0 commit comments