diff --git a/_bin/i3exit b/_bin/i3exit new file mode 100755 index 0000000..757eba3 --- /dev/null +++ b/_bin/i3exit @@ -0,0 +1,35 @@ +#!/bin/sh +lock() { + if [ -e "$(which i3lock)" ]; then + i3lock + fi +} + +case "$1" in + lock) + ~/bin/lockscreen + ;; + logout) + i3-msg exit + ;; + suspend) + lock && systemctl suspend + ;; + hibernate) + lock && systemctl hibernate + ;; + blank) + sleep 1; xset dpms force off + ;; + reboot) + systemctl reboot + ;; + shutdown) + systemctl poweroff + ;; + *) + echo "Usage: $0 {lock|logout|suspend|hibernate|blank|reboot|shutdown}" + exit 2 +esac + +exit 0 diff --git a/_bin/screengrab b/_bin/screengrab new file mode 100755 index 0000000..8600300 --- /dev/null +++ b/_bin/screengrab @@ -0,0 +1,8 @@ +#!/bin/sh +mkdir -p ${HOME}/screenshot +TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png" +maim -s -n -p 1 -f png -m 10 -u | tee $TARGET | xclip -selection clipboard -t image/png + +[ -s ${TARGET} ] || rm ${TARGET} + +