diff --git a/rofi/power/launch.sh b/rofi/power/launch.sh index d2c0aa2..fac181f 100755 --- a/rofi/power/launch.sh +++ b/rofi/power/launch.sh @@ -63,17 +63,9 @@ run_cmd() { elif [[ $1 == '--reboot' ]]; then loginctl reboot elif [[ $1 == '--suspend' ]]; then - loginctl suspend && betterlockscreen -l blur + loginctl suspend elif [[ $1 == '--logout' ]]; then - if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then - openbox --exit - elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then - bspc quit - elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then - i3-msg exit - elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then - qdbus org.kde.ksmserver /KSMServer logout 0 0 0 - fi + bspc quit & pkill pipewire & pkill pipewire-pulse & pkill polybar fi else exit 0 @@ -98,8 +90,9 @@ case ${chosen} in ;; $suspend) run_cmd --suspend + betterlockscreen -l blur ;; $logout) - run_cmd --logout & pkill pipewire & pkill pipewire-pulse + run_cmd --logout ;; esac