From 9743b342455459f061157fc3ad264119b411fe42 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 5 Jun 2025 22:29:54 +1000 Subject: bar: power button open session Make it actually useful (not really) --- modules/bar/components/Power.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules') 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; + } + } } -- cgit v1.2.3-freya