summaryrefslogtreecommitdiff
path: root/scripts/.local/bin/powermenu
blob: 5a577a7ffd8313a047dac1f5014cd5201078e7e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

OPERATION=$(printf "Reboot\nShutdown\nSuspend" | dmenu -i -p "Power Menu:")

case $OPERATION in
	Reboot)
		doas reboot
		;;
	Shutdown)
		doas poweroff
		;;
	Suspend)
		slock &
		(loginctl suspend || systemctl suspend)
esac