dotfiles/.scripts/powerbutton

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