Update .config/polybar/scripts/powermenu.sh

This commit is contained in:
punkfairie 2024-07-28 18:02:23 -07:00
parent eb11cccc2e
commit bc117fe68d
Signed by: punkfairie
GPG key ID: A86AF57F837E320F

View file

@ -33,7 +33,7 @@ options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)" chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
case $chosen in case $chosen in
$shutdown) "$shutdown")
ans=$(confirm_exit &) ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl poweroff systemctl poweroff
@ -43,7 +43,7 @@ $shutdown)
msg msg
fi fi
;; ;;
$reboot) "$reboot")
ans=$(confirm_exit &) ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl reboot systemctl reboot
@ -53,12 +53,12 @@ $reboot)
msg msg
fi fi
;; ;;
$lock) "$lock")
if [[ -f /usr/bin/betterlockscreen ]]; then if [[ -f /usr/bin/betterlockscreen ]]; then
betterlockscreen -l betterlockscreen -l
fi fi
;; ;;
$suspend) "$suspend")
ans=$(confirm_exit &) ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
mpc -q pause mpc -q pause
@ -70,7 +70,7 @@ $suspend)
msg msg
fi fi
;; ;;
$logout) "$logout")
ans=$(confirm_exit &) ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then