diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-11-19 15:21:44 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-11-19 15:21:44 +0000 |
commit | 2ece7032558cd0be673d65237a01c5e6ffe625f1 (patch) | |
tree | bc88a1eecb4f70e212bf8c2a5e3755120a05d856 /i3/.config/i3/i3exit | |
parent | d9028e12d857d1fdb68b507bfa8dffbd64b7b2f7 (diff) | |
download | dotfiles-2ece7032558cd0be673d65237a01c5e6ffe625f1.tar.gz dotfiles-2ece7032558cd0be673d65237a01c5e6ffe625f1.zip |
Move to a GNU Stow config
Diffstat (limited to 'i3/.config/i3/i3exit')
-rwxr-xr-x | i3/.config/i3/i3exit | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/i3/.config/i3/i3exit b/i3/.config/i3/i3exit new file mode 100755 index 0000000..4292234 --- /dev/null +++ b/i3/.config/i3/i3exit @@ -0,0 +1,30 @@ +#!/bin/sh +lock() { + i3lock -c 2f2f2f +} + +case "$1" in + lock) + lock + ;; + logout) + i3-msg exit + ;; + suspend) + lock && systemctl suspend + ;; + hibernate) + lock && systemctl hibernate + ;; + reboot) + systemctl reboot + ;; + shutdown) + systemctl poweroff + ;; + *) + echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}" + exit 2 +esac + +exit 0 |