2020-05-08 20:35:40 +02:00

12 lines
313 B
Bash
Executable File

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