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 <anjan@momi.ca>
This commit is contained in:
ArenM
2023-04-07 20:17:00 -04:00
committed by Anjandev Momi
parent 4da4bb9b1e
commit ce6514d490

View File

@@ -22,13 +22,9 @@ case "$1" in
;; ;;
logout) logout)
sxmo_hook_logout.sh sxmo_hook_logout.sh
case "$(realpath /var/lib/tinydm/default-session.desktop)" in case "$SXMO_WM" in
*"swmo.desktop") "sway") swaymsg exit ;;
swaymsg exit "dwm") pkill dwm ;;
;;
*"sxmo.desktop")
pkill dwm
;;
esac esac
;; ;;
togglewm) togglewm)