You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
323 B

#!/bin/sh
# rofi based powermenu
LOCKSCREEN="trollock -b bg"
case "$(printf %s "\
Suspend
Lock screen
Reboot
Power-off
" | rofi -width 20 -lines 4 -dmenu -no-custom -i -format i -p 'Powermenu: ')" in
0) $LOCKSCREEN & sudo -n zzz;;
1) $LOCKSCREEN & xset dpms force off;;
2) sudo -n reboot;;
3) sudo -n poweroff;;
esac