Added Power Menu.

This commit is contained in:
James Patrick 2019-06-17 21:07:14 -04:00
parent b8f9e403b9
commit 1701752b32
2 changed files with 34 additions and 1 deletions

View File

@ -3,5 +3,5 @@
Type=Application Type=Application
Version=1.0 Version=1.0
Name=Power Name=Power
Exec=sh ~/.config/rofi/scripts/media_controls Exec=sh ~/.config/rofi/scripts/power_menu
Terminal=false Terminal=false

33
rofi/scripts/power_menu Executable file
View File

@ -0,0 +1,33 @@
#!/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