fix openbox detection by using a cleaner case...esac

fixes #41
This commit is contained in:
Leo 2021-09-09 21:14:58 -03:00
parent aba9eb3d1a
commit 2d22dbead4
2 changed files with 22 additions and 14 deletions

View File

@ -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
case "$DESKTOP_SESSION" in
Openbox|openbox)
openbox --exit
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
;;
bspwm)
bspc quit
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
;;
i3)
i3-msg exit
fi
;;
esac
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else

View File

@ -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
case "$DESKTOP_SESSION" in
Openbox|openbox)
openbox --exit
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
;;
bspwm)
bspc quit
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
;;
i3)
i3-msg exit
fi
;;
esac
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else