12 lines
334 B
Plaintext
Raw Normal View History

2020-05-08 20:35:40 +02:00
#!/usr/bin/env sh
2020-05-11 12:58:50 +02:00
WHAT="$(printf " Shutdown\n Reboot\n Lock\n Suspend" | rofi -dmenu -i -p 'Powermenu' -l 4 -width 10px)"
2020-05-08 20:35:40 +02:00
if [ -z "$WHAT" ]; then exit; fi
case "$WHAT" in
2020-05-11 12:58:50 +02:00
" Shutdown") systemctl poweroff;;
" Suspend") lockscreen; systemctl suspend;;
" Lock") lockscreen;;
" Reboot") systemctl reboot
2020-05-08 20:35:40 +02:00
esac