.dotfiles/.config/wofi/scripts/power-menu

17 lines
359 B
Plaintext
Raw Permalink Normal View History

2021-11-28 16:19:50 +01:00
#!/bin/bash
2022-05-04 18:55:48 +02:00
entries="⏻ Shutdown\n↺ Reboot\n⇠ Logout\n⏾ Suspend"
2021-11-28 16:19:50 +01:00
2022-05-04 18:55:48 +02:00
selected=$(echo -e $entries|wofi --width 250 --height 150 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
2021-11-28 16:19:50 +01:00
case $selected in
logout)
swaymsg exit;;
suspend)
exec systemctl suspend;;
reboot)
exec systemctl reboot;;
shutdown)
2022-03-01 23:25:44 +01:00
exec shutdown now;;
2021-11-28 16:19:50 +01:00
esac