Use Hyprland's 'exec-shutdown'

This commit is contained in:
Viyurz 2024-10-07 09:27:55 +02:00
parent ee07633f80
commit 6e6070b7b7
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8
3 changed files with 4 additions and 7 deletions

View file

@ -41,3 +41,6 @@ exec-once = udiskie
# XWayland # XWayland
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
exec-shutdown = $HOME/.config/zsh/.zlogout

View file

@ -6,7 +6,7 @@
} }
{ {
"label" : "logout", "label" : "logout",
"action" : "~/.config/zsh/.zlogout", "action" : "hyprctl dispatch exit",
"text" : "Logout", "text" : "Logout",
"keybind" : "e" "keybind" : "e"
} }

View file

@ -12,10 +12,4 @@ if [[ $(who | grep "$USER" | wc -l) -le 1 ]]; then
pkill -u "$USER" -9 ssh-agent pkill -u "$USER" -9 ssh-agent
fi fi
if [[ -n $HYPRLAND_INSTANCE_SIGNATURE ]]; then
HYPRCMDS=$(hyprctl -j clients | jq -j '.[] | "dispatch closewindow address:\(.address); "')
hyprctl -q --batch "$HYPRCMDS"
hyprctl dispatch exit
fi
loginctl terminate-session $XDG_SESSION_ID loginctl terminate-session $XDG_SESSION_ID