i3-quit 576 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. if [ $# -lt 1 ] ; then
  3. echo "i3-quit logout | shutdown | reboot | show"
  4. fi
  5. case ${1} in
  6. logout)
  7. i3-msg exit
  8. ;;
  9. shutdown)
  10. # kdesu -c "systemctl poweroff"
  11. systemctl poweroff
  12. ;;
  13. reboot)
  14. # kdesu -c "systemctl restart"
  15. systemctl reboot
  16. ;;
  17. show)
  18. i3-nagbar -t warning -m 'How would you like to leave?' \
  19. -b 'Exit i3' 'i3-quit logout' \
  20. -b 'Restart' 'i3-quit reboot' \
  21. -b 'Shutdown' 'i3-quit shutdown'
  22. esac