Files
myi3/files/configs/misc-scripts/i3exit
2026-02-14 21:23:19 +01:00

33 lines
610 B
Bash
Executable File

#!/bin/sh
# /usr/bin/i3exit
case "$1" in
lock)
blurlock
;;
logout)
i3-msg exit
;;
switch_user)
dm-tool switch-to-greeter
;;
suspend)
blurlock && systemctl suspend
;;
hibernate)
blurlock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "== ! i3exit: missing or invalid argument ! =="
echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown"
exit 2
esac
exit 0