diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-07-28 14:06:00 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-07-28 14:06:00 +0100 |
commit | 068dd950068dd21baa642bc5072f7e621071fda4 (patch) | |
tree | 1b54904ac6be50099e2fdb76b41b02c3e8442b2d /i3/i3exit | |
parent | 661351626c0e9ed881878c1ee5f6940c40e38fb2 (diff) | |
download | dotfiles-068dd950068dd21baa642bc5072f7e621071fda4.tar.gz dotfiles-068dd950068dd21baa642bc5072f7e621071fda4.zip |
Better i3 bindings and adding script
Diffstat (limited to 'i3/i3exit')
-rwxr-xr-x | i3/i3exit | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/i3/i3exit b/i3/i3exit new file mode 100755 index 0000000..4292234 --- /dev/null +++ b/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 |