diff --git a/1080p/powermenu/powermenu.sh b/1080p/powermenu/powermenu.sh index 9b444f4..289995a 100755 --- a/1080p/powermenu/powermenu.sh +++ b/1080p/powermenu/powermenu.sh @@ -101,13 +101,17 @@ case $chosen in $logout) ans=$(confirm_exit &) if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then - if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then - openbox --exit - elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then - bspc quit - elif [[ "$DESKTOP_SESSION" == "i3" ]]; then - i3-msg exit - fi + case "$DESKTOP_SESSION" in + Openbox|openbox) + openbox --exit + ;; + bspwm) + bspc quit + ;; + i3) + i3-msg exit + ;; + esac elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then exit 0 else diff --git a/720p/powermenu/powermenu.sh b/720p/powermenu/powermenu.sh index 9b444f4..289995a 100755 --- a/720p/powermenu/powermenu.sh +++ b/720p/powermenu/powermenu.sh @@ -101,13 +101,17 @@ case $chosen in $logout) ans=$(confirm_exit &) if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then - if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then - openbox --exit - elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then - bspc quit - elif [[ "$DESKTOP_SESSION" == "i3" ]]; then - i3-msg exit - fi + case "$DESKTOP_SESSION" in + Openbox|openbox) + openbox --exit + ;; + bspwm) + bspc quit + ;; + i3) + i3-msg exit + ;; + esac elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then exit 0 else