diff --git a/bin/blurlock b/bin/blurlock new file mode 100755 index 0000000..c7772ad --- /dev/null +++ b/bin/blurlock @@ -0,0 +1,13 @@ +#!/bin/bash +set -eu + +RESOLUTION=$(xrandr -q|sed -n 's/.*current[ ]\([0-9]*\) x \([0-9]*\),.*/\1x\2/p') + +# lock the screen +import -silent -window root jpeg:- | convert - -scale 20% -blur 0x2.5 -resize 500% RGB:- | \ + i3lock --raw $RESOLUTION:rgb -i /dev/stdin -e $@ + +# sleep 1 adds a small delay to prevent possible race conditions with suspend +#sleep 1 + +exit 0 diff --git a/bin/clean.sh b/bin/clean.sh index 72b8d63..781f36e 100644 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -1,3 +1,4 @@ #!/bin/sh rm -rf ~/bin/power +rm -rf ~/bin/blurlock diff --git a/bin/install.sh b/bin/install.sh index 8e95ee1..a31ddaf 100644 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,5 +1,7 @@ #!/bin/sh rm -rf ~/bin/power +rm -rf ~/bin/blurlock ln -s $HOME/dotfiles/bin/power $HOME/bin/power +ln -s $HOME/dotfiles/bin/blurlock $HOME/bin/blurlock diff --git a/spectrwm/autostart.sh b/spectrwm/autostart.sh index f446f03..2a81918 100755 --- a/spectrwm/autostart.sh +++ b/spectrwm/autostart.sh @@ -14,6 +14,6 @@ pamac-tray & clipit & #blueman-applet & #start_conky_maia & -xautolock -time 10 -locker blurlock & +xautolock -time 10 -locker ~/bin/blurlock & udiskie --no-automount --tray & # gajim &