From 6e6070b7b72a0c5d9a3d55f21f4d4bc7e917197a Mon Sep 17 00:00:00 2001 From: Viyurz Date: Mon, 7 Oct 2024 09:27:55 +0200 Subject: [PATCH] Use Hyprland's 'exec-shutdown' --- .config/hypr/hyprland.d/exec.conf | 3 +++ .config/wlogout/layout | 2 +- .config/zsh/.zlogout | 6 ------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.config/hypr/hyprland.d/exec.conf b/.config/hypr/hyprland.d/exec.conf index 14f3083..5bdd541 100644 --- a/.config/hypr/hyprland.d/exec.conf +++ b/.config/hypr/hyprland.d/exec.conf @@ -41,3 +41,6 @@ exec-once = udiskie # XWayland exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 + + +exec-shutdown = $HOME/.config/zsh/.zlogout diff --git a/.config/wlogout/layout b/.config/wlogout/layout index eeac71c..1b89340 100644 --- a/.config/wlogout/layout +++ b/.config/wlogout/layout @@ -6,7 +6,7 @@ } { "label" : "logout", - "action" : "~/.config/zsh/.zlogout", + "action" : "hyprctl dispatch exit", "text" : "Logout", "keybind" : "e" } diff --git a/.config/zsh/.zlogout b/.config/zsh/.zlogout index 9d4073e..3e0746c 100755 --- a/.config/zsh/.zlogout +++ b/.config/zsh/.zlogout @@ -12,10 +12,4 @@ if [[ $(who | grep "$USER" | wc -l) -le 1 ]]; then pkill -u "$USER" -9 ssh-agent 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