quickshell: suspend in session menu, lock-before-sleep on Gaming
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c9b69bf86f
commit
5195c60fb5
2 changed files with 7 additions and 2 deletions
|
|
@ -4833,6 +4833,7 @@ in
|
|||
|
||||
readonly property var actions: [
|
||||
{ icon: "lock", danger: false, act: "lock" },
|
||||
{ icon: "moon", danger: false, act: "suspend" },
|
||||
{ icon: "log-out", danger: false, act: "logout" },
|
||||
{ icon: "rotate-ccw", danger: true, act: "reboot" },
|
||||
{ icon: "power", danger: true, act: "poweroff" }
|
||||
|
|
@ -4841,6 +4842,10 @@ in
|
|||
function activate(act) {
|
||||
animateClose();
|
||||
if (act === "lock") bar.shellRoot.lock();
|
||||
// No lock call here: systemd-suspend runs
|
||||
// lock-before-sleep, which locks before the machine
|
||||
// actually goes down (settings/hyprland.nix).
|
||||
else if (act === "suspend") Quickshell.execDetached([Commands.systemctl, "suspend"]);
|
||||
else if (act === "logout") Hyprland.dispatch("hl.dsp.exit()");
|
||||
else if (act === "reboot") Quickshell.execDetached([Commands.systemctl, "reboot"]);
|
||||
else Quickshell.execDetached([Commands.systemctl, "poweroff"]);
|
||||
|
|
@ -4899,7 +4904,7 @@ in
|
|||
SIcon {
|
||||
anchors.centerIn: parent
|
||||
text: sessBtn.modelData.icon
|
||||
// All four buttons share the logout
|
||||
// All five buttons share the logout
|
||||
// setup: base05, FILL on selection.
|
||||
color: Theme.base05
|
||||
font.pixelSize: 20
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue