diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-04-09 22:18:49 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-04-09 22:18:49 -0600 |
commit | 8317b4d08e3d5b2a9e86c6a582799f5429d783fc (patch) | |
tree | 6e8a84086f62fce3a87de2145e70821a19d10a68 | |
parent | 4d611c0ce6fa12c29a85085d6b97d9e0170358a9 (diff) | |
download | bin-8317b4d08e3d5b2a9e86c6a582799f5429d783fc.tar.gz bin-8317b4d08e3d5b2a9e86c6a582799f5429d783fc.tar.xz |
Added first iterration of i3-lock-wrapper
-rwxr-xr-x | i3-lock-wrapper | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/i3-lock-wrapper b/i3-lock-wrapper new file mode 100755 index 0000000..556ab5a --- /dev/null +++ b/i3-lock-wrapper @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# +# Performs a standard screen lock, with an extra bit of style. Before locking +# the screen, takes a screenshot of the current display and programatically +# blurs and desaturates the image, using that for the lock screen background. A +# mighty neat effect. +# +# Requirements: i3-lock imagemagick [scrot] [xbacklight] +# + +base=/tmp/i3-lock-wrapper-$(date "+%s") +file1=base.jpg +file2=base2.png + +if [[ $(which import) ]]; then + import -window root "$file1" +elif [[ $(which scrot) ]]; then + scrot -d0 "$file1" +else + echo "Screenshot command not found (scrot or import). Exiting." +fi + +convert "$file1" -blur 0x4 -modulate 110,50 "$file2" + + +xbacklight -set 2% -time 3000 -steps 100& + +i3lock -i "$file2" -n + +xbacklight -set 10% -time 2000 -steps 100 + +rm "$file1" "$file2" |