diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-23 19:15:21 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-23 19:15:21 +1000 |
| commit | bf686b1c36163fb0038246a11aa17449b7aee783 (patch) | |
| tree | 7468e2e3904ebc12f0e0bc1cdeb5fa5a9bc9eefc /modules/session/Content.qml | |
| parent | systemusage: fix gpu temp (diff) | |
| download | caelestia-shell-bf686b1c36163fb0038246a11aa17449b7aee783.tar.gz caelestia-shell-bf686b1c36163fb0038246a11aa17449b7aee783.tar.bz2 caelestia-shell-bf686b1c36163fb0038246a11aa17449b7aee783.zip | |
drawers: give back focus when close
For launcher and session, give back focus to previously open one on close
Also use execDetached for session buttons
Diffstat (limited to 'modules/session/Content.qml')
| -rw-r--r-- | modules/session/Content.qml | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/session/Content.qml b/modules/session/Content.qml index adf5aa2..40b7da2 100644 --- a/modules/session/Content.qml +++ b/modules/session/Content.qml @@ -4,7 +4,6 @@ import "root:/widgets" import "root:/services" import "root:/config" import Quickshell -import Quickshell.Io import QtQuick Column { @@ -34,6 +33,11 @@ Column { if (root.visibilities.session) logout.focus = true; } + + function onLauncherChanged(): void { + if (root.visibilities.session && !root.visibilities.launcher) + logout.focus = true; + } } } @@ -90,22 +94,16 @@ Column { radius: Appearance.rounding.large color: button.activeFocus ? Colours.palette.m3secondaryContainer : Colours.palette.m3surfaceContainer - Keys.onEnterPressed: proc.startDetached() - Keys.onReturnPressed: proc.startDetached() + Keys.onEnterPressed: Quickshell.execDetached(button.command) + Keys.onReturnPressed: Quickshell.execDetached(button.command) Keys.onEscapePressed: root.visibilities.session = false - Process { - id: proc - - command: button.command - } - StateLayer { radius: parent.radius color: button.activeFocus ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface function onClicked(): void { - proc.startDetached(); + Quickshell.execDetached(button.command); } } |