Create power-menu.sh

This commit is contained in:
morten-b
2021-01-21 11:29:08 +01:00
committed by GitHub
parent 31ee93b84e
commit 00b96f38ef

View 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