summaryrefslogtreecommitdiff
path: root/modules/bar
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-09 21:57:44 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-09 21:57:44 +1000
commitc3e8127422c7439d9ddb07e3634c892abb7b53f4 (patch)
tree75df572c5ca70e7e52168f14bf515130b2dcf817 /modules/bar
parentnotifs: add indicators for offscreen notifs (diff)
downloadcaelestia-shell-c3e8127422c7439d9ddb07e3634c892abb7b53f4.tar.gz
caelestia-shell-c3e8127422c7439d9ddb07e3634c892abb7b53f4.tar.bz2
caelestia-shell-c3e8127422c7439d9ddb07e3634c892abb7b53f4.zip
internal: pass around visibilities
Instead of singleton Also for panels
Diffstat (limited to 'modules/bar')
-rw-r--r--modules/bar/Bar.qml3
-rw-r--r--modules/bar/components/Power.qml7
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
index 9f5509b..5a8f598 100644
--- a/modules/bar/Bar.qml
+++ b/modules/bar/Bar.qml
@@ -11,6 +11,7 @@ Item {
id: root
required property ShellScreen screen
+ required property PersistentProperties visibilities
required property BarPopouts.Wrapper popouts
function checkPopout(y: real): void {
@@ -169,6 +170,8 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: Appearance.padding.large
+
+ visibilities: root.visibilities
}
}
}
diff --git a/modules/bar/components/Power.qml b/modules/bar/components/Power.qml
index a870cb3..c74dd3c 100644
--- a/modules/bar/components/Power.qml
+++ b/modules/bar/components/Power.qml
@@ -4,6 +4,10 @@ import "root:/config"
import Quickshell
MaterialIcon {
+ id: root
+
+ required property PersistentProperties visibilities
+
text: "power_settings_new"
color: Colours.palette.m3error
font.bold: true
@@ -20,8 +24,7 @@ MaterialIcon {
radius: Appearance.rounding.full
function onClicked(): void {
- const v = Visibilities.screens[QsWindow.window.screen];
- v.session = !v.session;
+ root.visibilities.session = !root.visibilities.session;
}
}
}