dotfiles/.scripts/powerbutton

11 lines
322 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") shutdownnow ;;
("Restart") reboot ;;
("Sleep") systemctl suspend ;;
("Lock") betterlockscreen -l ;;
esac