Files
i3-themer/i3-exit
T
2021-01-15 17:30:04 -03:00

29 lines
528 B
Bash
Executable File

#!/bin/sh
printHelp(){
echo "Usage: i3-exit {lock|logout|reboot|shutdown}"
}
lock(){
screenshot="/tmp/qI5MkdEu.png"
screenshotblur="/tmp/Vur4EooC.png"
import -window root "$screenshot"
convert "$screenshot" -blur 0x5 "$screenshotblur"
rm "$screenshot"
i3lock -i "$screenshotblur"
xset dpms force off
}
case "$1" in
lock)
lock ;;
logout)
i3-msg exit ;;
reboot)
systemctl reboot ;;
shutdown)
systemctl poweroff ;;
*)
printHelp ;;
esac