Added Power Menu.
This commit is contained in:
parent
b8f9e403b9
commit
1701752b32
|
@ -3,5 +3,5 @@
|
|||
Type=Application
|
||||
Version=1.0
|
||||
Name=Power
|
||||
Exec=sh ~/.config/rofi/scripts/media_controls
|
||||
Exec=sh ~/.config/rofi/scripts/power_menu
|
||||
Terminal=false
|
||||
|
|
33
rofi/scripts/power_menu
Executable file
33
rofi/scripts/power_menu
Executable 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
|
||||
|
Loading…
Reference in New Issue
Block a user