aboutsummaryrefslogtreecommitdiff
path: root/.config/polybar/forest/scripts/powermenu.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/polybar/forest/scripts/powermenu.sh')
-rwxr-xr-x.config/polybar/forest/scripts/powermenu.sh17
1 files changed, 3 insertions, 14 deletions
diff --git a/.config/polybar/forest/scripts/powermenu.sh b/.config/polybar/forest/scripts/powermenu.sh
index 84eddf4..271006d 100755
--- a/.config/polybar/forest/scripts/powermenu.sh
+++ b/.config/polybar/forest/scripts/powermenu.sh
@@ -17,15 +17,6 @@ lock=" Lock"
suspend=" Sleep"
logout=" Logout"
-# Confirmation
-confirm_exit() {
- rofi -dmenu\
- -i\
- -no-fixed-num-lines\
- -p "Are You Sure? : "\
- -theme $dir/confirm.rasi
-}
-
# Message
msg() {
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
@@ -39,7 +30,7 @@ case $chosen in
$shutdown)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- systemctl poweroff
+ loginctl poweroff
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
@@ -49,7 +40,7 @@ case $chosen in
$reboot)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- systemctl reboot
+ loginctl reboot
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
@@ -66,9 +57,7 @@ case $chosen in
$suspend)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
- mpc -q pause
- amixer set Master mute
- systemctl suspend
+ ZZZ
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else