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.

rofi-powermenu 323B

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