From ce6514d49030244e70ee7f225566b6a54a27d59d Mon Sep 17 00:00:00 2001 From: ArenM Date: Fri, 7 Apr 2023 20:17:00 -0400 Subject: [PATCH] check SXMO_WM instead of tinydm session when logging out This could break if someone decides not to use tinydm, or uses tinyd-set-session instead of togglewm. Signed-off-by: Anjandev Momi --- scripts/core/sxmo_power.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/core/sxmo_power.sh b/scripts/core/sxmo_power.sh index dbab3a2..77649d8 100755 --- a/scripts/core/sxmo_power.sh +++ b/scripts/core/sxmo_power.sh @@ -22,13 +22,9 @@ case "$1" in ;; logout) sxmo_hook_logout.sh - case "$(realpath /var/lib/tinydm/default-session.desktop)" in - *"swmo.desktop") - swaymsg exit - ;; - *"sxmo.desktop") - pkill dwm - ;; + case "$SXMO_WM" in + "sway") swaymsg exit ;; + "dwm") pkill dwm ;; esac ;; togglewm)