aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/GlobalState.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-05-18 21:48:24 +0200
committerLeander Scherer <leander@schererleander.de>2026-05-28 22:42:07 +0200
commit9a7cf1242d296dbdb9c03df48ab09054960295aa (patch)
treef1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/GlobalState.qml
parent3ef8b4973bcae26445f99467d50ad75730d204b5 (diff)
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/GlobalState.qml')
-rw-r--r--modules/system/quickshell/GlobalState.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/system/quickshell/GlobalState.qml b/modules/system/quickshell/GlobalState.qml
new file mode 100644
index 0000000..c212967
--- /dev/null
+++ b/modules/system/quickshell/GlobalState.qml
@@ -0,0 +1,23 @@
+import QtQuick
+
+pragma Singleton
+
+// Shared state to coordinate which popup is currently open.
+// Ensures only one menu is visible at a time.
+QtObject {
+ property string activePopup: ""
+
+ function open(name) {
+ activePopup = ""
+ activePopup = name
+ }
+
+ function close() {
+ activePopup = ""
+ }
+
+ function toggle(name) {
+ if (activePopup === name) activePopup = ""
+ else activePopup = name
+ }
+}