diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 22:29:54 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 22:29:54 +1000 |
| commit | 9743b342455459f061157fc3ad264119b411fe42 (patch) | |
| tree | 3722668c349081ce32caeb66fcc5720c6a407f0a /modules/bar/components/Power.qml | |
| parent | popouts: better anim (diff) | |
| download | caelestia-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/Power.qml')
| -rw-r--r-- | modules/bar/components/Power.qml | 17 |
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; + } + } } |