a5799bf3510d99513414d1bcd96279aa50a9e20a — Stacy Harper 2 months ago 3c3c5f5
Add a check before toggeling wm

Currently on 1.5.1, sway is not installed nor setted up. This WM toggle
entry cause a tty soft lock !

This fix this with a very too simple check but that will prevent this
1 files changed, 7 insertions(+), 0 deletions(-)

M scripts/core/sxmo_wmtoggle.sh
M scripts/core/sxmo_wmtoggle.sh => scripts/core/sxmo_wmtoggle.sh +7 -0
@@ 1,11 1,18 @@

not_ready_yet() {
	notify-send "Your device looks not ready yet"
	exit 1

case "$(realpath /var/lib/tinydm/default-session.desktop)" in
		command -v dwm || not_ready_yet
		sudo tinydm-set-session -f -s /usr/share/xsessions/sxmo.desktop
		pkill sway
		command -v sway || not_ready_yet
		sudo tinydm-set-session -f -s /usr/share/wayland-sessions/swmo.desktop
		pkill dwm