.dotfiles/configs/wofi/wofi-power-menu.sh

17 lines
368 B
Bash
Raw Normal View History

2021-11-28 16:19:50 +01:00
#!/bin/bash
entries="⏻ Shutdown\n⭮ Reboot\n⇠ Logout\n⏾ Suspend"
selected=$(echo -e $entries|wofi --width 250 --height 210 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
case $selected in
logout)
swaymsg exit;;
suspend)
exec systemctl suspend;;
reboot)
exec systemctl reboot;;
shutdown)
exec systemctl poweroff -i;;
esac