diff --git a/scripts/core/sxmo_wmtoggle.sh b/scripts/core/sxmo_wmtoggle.sh index d1ef094..ef78dcc 100644 --- a/scripts/core/sxmo_wmtoggle.sh +++ b/scripts/core/sxmo_wmtoggle.sh @@ -1,11 +1,18 @@ #!/bin/sh +not_ready_yet() { + notify-send "Your device looks not ready yet" + exit 1 +} + case "$(realpath /var/lib/tinydm/default-session.desktop)" in /usr/share/wayland-sessions/swmo.desktop) + command -v dwm || not_ready_yet sudo tinydm-set-session -f -s /usr/share/xsessions/sxmo.desktop pkill sway ;; /usr/share/xsessions/sxmo.desktop) + command -v sway || not_ready_yet sudo tinydm-set-session -f -s /usr/share/wayland-sessions/swmo.desktop pkill dwm ;;