dotfiles/home/dot_config/wofi/executable_wofi-power.sh

17 lines
368 B
Bash
Raw Normal View History

2023-02-25 16:18:35 +00:00
#!/bin/bash
entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown"
selected=$(echo -e $entries|wofi --width 350 --height 250 --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