summaryrefslogtreecommitdiffstats
path: root/bin/power.sh
blob: 24657364e5489a21cd02f5308c1cf00ec39a1597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

prog="
suspend
reboot
shutdown
"

cmd=$(dmenu -b -l 20 -fn 'xft:profont:size=8' -nf '#999' -nb '#000' -sf '#eee' -sb '#0077bb' <<< "$prog")

case ${cmd%% *} in
	
	suspend)	exec gksu pm-suspend  ;;
	reboot)	        exec gksu reboot  ;;
	shutdown)	exec gksu 'shutdown -hP now'  ;;
  	*)		exec "'${cmd}'"  ;;
esac