Add system exit dialog.

This commit is contained in:
Sebastian Bugge 2024-11-24 19:13:49 +01:00
parent 2a917d93e3
commit 33ef5a333f
2 changed files with 43 additions and 0 deletions

28
.config/i3/i3exit Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env bash
case "$1" in
lock)
i3lock
;;
logout)
i3-msg exit
;;
suspend)
i3lock && systemctl suspend
;;
hibernate)
i3lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 [lock|logout|suspend|hibernate|reboot|shutdown]"
exit 2
;;
esac
exit 0