Create power-menu.sh
This commit is contained in:
16
.config/waybar/scripts/power-menu.sh
Normal file
16
.config/waybar/scripts/power-menu.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
entries="Logout Suspend Reboot Shutdown"
|
||||||
|
|
||||||
|
selected=$(printf '%s\n' $entries | wofi --width 300 --height 150 --show=dmenu --cache-file /dev/null | awk '{print tolower($1)}')
|
||||||
|
|
||||||
|
case $selected in
|
||||||
|
logout)
|
||||||
|
swaymsg exit;;
|
||||||
|
suspend)
|
||||||
|
exec systemctl suspend;;
|
||||||
|
reboot)
|
||||||
|
exec systemctl reboot;;
|
||||||
|
shutdown)
|
||||||
|
exec systemctl poweroff -i;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user