.config/i3/old_i3_config/screenlocker.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
#!/usr/bin/env bash # script for locking my screen on Arch using i3lock # thanks to http://www.michaelabrahamsen.com/posts/custom-lockscreen-i3lock/ # set icon and temporary photo location icon="$HOME/.config/i3/icon.png" tmpbg='/tmp/screenshot-temp.png' # cleans up if screenshot already exists because scrot won't overwrite rm -f $tmpbg # takes a screenshot of the current screen scrot "$tmpbg" # blur the screenshot by resizing and scaling back up convert "$tmpbg" -filter Gaussian -thumbnail 20% -sample 500% "$tmpbg" # overlay the icon onto the temporary screenshot convert "$tmpbg" "$icon" -gravity center -composite "$tmpbg" # thank you to https://github.com/PandorasFox/i3lock-color/blob/master/lock.sh # colors for i3lock-color B='#00000000' # blank or 'nothing' D='#aaaaaacc' # default W='#dd0000ff' # wrong red V='#22bb88ff' # verifying # lock the screen with the blurred picture AND lock icon settings i3lock \ --insidevercolor=$V \ --ringvercolor=$V \ \ --insidewrongcolor=$W \ --ringwrongcolor=$W \ \ --insidecolor=$B \ --ringcolor=$D \ --linecolor=$B \ --separatorcolor=$D \ \ --timecolor=$B \ --datecolor=$B \ \ --verifcolor=$B \ --wrongcolor=$B \ --keyhlcolor='4466ccff' \ --bshlcolor='000000ff' \ \ --screen 1 \ --indicator \ --indpos="x+40:h-840" \ --verif-align 1 \ --wrong-align 1 \ --radius=25 \ --ring-width=4 \ -i "$tmpbg" |