summaryrefslogtreecommitdiff
path: root/modules/bar/components
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-05 22:29:54 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-05 22:29:54 +1000
commit9743b342455459f061157fc3ad264119b411fe42 (patch)
tree3722668c349081ce32caeb66fcc5720c6a407f0a /modules/bar/components
parentpopouts: better anim (diff)
downloadcaelestia-shell-9743b342455459f061157fc3ad264119b411fe42.tar.gz
caelestia-shell-9743b342455459f061157fc3ad264119b411fe42.tar.bz2
caelestia-shell-9743b342455459f061157fc3ad264119b411fe42.zip
bar: power button open session
Make it actually useful (not really)
Diffstat (limited to 'modules/bar/components')
-rw-r--r--modules/bar/components/Power.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/bar/components/Power.qml b/modules/bar/components/Power.qml
index 7584747..a870cb3 100644
--- a/modules/bar/components/Power.qml
+++ b/modules/bar/components/Power.qml
@@ -1,10 +1,27 @@
import "root:/widgets"
import "root:/services"
import "root:/config"
+import Quickshell
MaterialIcon {
text: "power_settings_new"
color: Colours.palette.m3error
font.bold: true
font.pointSize: Appearance.font.size.normal
+
+ StateLayer {
+ anchors.fill: undefined
+ anchors.centerIn: parent
+ anchors.horizontalCenterOffset: 1
+
+ implicitWidth: parent.implicitHeight + Appearance.padding.small * 2
+ implicitHeight: implicitWidth
+
+ radius: Appearance.rounding.full
+
+ function onClicked(): void {
+ const v = Visibilities.screens[QsWindow.window.screen];
+ v.session = !v.session;
+ }
+ }
}