Advertisement
Dobbie03

rofi shutdown

Jun 30th, 2017
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. if
  4.  
  5. ACTION=$(echo -e "     Back Soon\n     Rest\n     Leave\n     Restart\n     Take Off" \
  6. | rofi -dmenu -p "  Return or Departure " -width 12)
  7.  
  8. then
  9.  
  10. case "$ACTION" in
  11.  
  12. "     Back Soon"|lock)
  13. dm-tool lock ;;
  14. "     Rest"|sleep|suspend)
  15. dm-tool lock && systemctl suspend ;;
  16. "     Hibernate"|hibernate)
  17. dm-tool lock && systemctl hibernate ;;
  18. "     Leave"|logout)
  19. openbox --exit ;;
  20. "     Restart"|reboot)
  21. openbox --exit && systemctl reboot ;;
  22. "     Take Off"|shutdown)
  23. openbox --exit && systemctl poweroff ;;
  24. "     Cancel"|*)
  25. exit ;;
  26.  
  27. esac
  28.  
  29. else
  30.  
  31. exit
  32.  
  33. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement