dotfiles/.scripts/powerbutton
2021-10-08 18:16:06 +02:00

11 lines
328 B
Bash
Executable file

#!/bin/bash
. "${HOME}/.cache/wal/colors.sh"
result=$(echo -e "Shutdown\nRestart\nSleep\nLock" | dmenu -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" -p "")
case "$result" in
("Shutdown") systemctl poweroff;;
("Restart") reboot ;;
("Sleep") systemctl suspend ;;
("Lock") betterlockscreen -l ;;
esac