dotfiles/.scripts/powerbutton

11 lines
328 B
Plaintext
Raw Normal View History

2021-10-05 13:18:32 +02:00
#!/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
2021-10-08 18:16:06 +02:00
("Shutdown") systemctl poweroff;;
2021-10-05 13:18:32 +02:00
("Restart") reboot ;;
("Sleep") systemctl suspend ;;
("Lock") betterlockscreen -l ;;
esac