i3exit script and tmpfs functions

This commit is contained in:
2017-09-16 15:46:03 +01:00
parent ee022dc913
commit 38fc515717
4 changed files with 87 additions and 1 deletions

30
bin/i3exit Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
lock() {
i3lock -f -c 000000
}
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