dotfiles/rofi/scripts/power_menu

34 lines
431 B
Plaintext
Raw Normal View History

2019-06-18 01:07:14 +00:00
#!/usr/bin/env bash
OPTIONS=" Lock
鈴 Sleep
 Logout
 Poweroff
淚 Restart"
SELECTED="$(
rofi -dmenu \
-theme applet \
-p "System" \
-i \
-line-padding 4 <<< $OPTIONS
)"
echo $SELECTED
case $SELECTED in
*Lock)
swaylock-fancy ;;
*Sleep)
systemctl hibernate ;;
*Logout)
swaymsg exit ;;
*Poweroff)
systemctl poweroff ;;
*Restart)
systemctl reboot ;;
*)
echo $SELCTED ;;
esac