Fix powermenu and move it from dmenu to rofi

This commit is contained in:
Wiktor Zykubek 2020-05-10 10:28:19 +02:00
parent 9c05d46e57
commit 67a5faa42f

View File

@ -1,11 +1,11 @@
#!/usr/bin/env sh
WHAT="$(printf "Shutdown\nSuspend\nLock\nReboot" | dmenu -i -p 'What do you want?' -h 24)"
WHAT="$(printf "Shutdown\nSuspend\nLock\nReboot" | rofi -dmenu -i -p 'What do you want?' -l 4)"
if [ -z "$WHAT" ]; then exit; fi
case "$WHAT" in
Shutdown) systemctl poweroff;;
Suspend) sh ~/.scripts/lockscreen; systemctl suspend;;
Lock) sh ~/.scripts/lockscreen;;
Suspend) lockscreen; systemctl suspend;;
Lock) lockscreen;;
Reboot) systemctl reboot
esac