#!/bin/bash # Credit github user iambecomeroot, MIT licence # https://github.com/iambecomeroot/dotfiles/blob/master/bin/bin/lock # Modified by trotFunky rectangles=" " #scrot_options="-scale 5% -scale 2000%" # Pixelate scrot_options="-blur 0x3" SR=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*') for RES in $SR; do SRA=(${RES//[x+]/ }) CX=$((${SRA[2]} + 25)) CY=$((${SRA[1]} - 80)) rectangles+="rectangle $CX,$CY $((CX+300)),$((CY-80)) " done TMPBG=/tmp/screen.png scrot $TMPBG && convert $TMPBG $scrot_options -draw "fill black fill-opacity 0.4 $rectangles" $TMPBG i3lock \ -i $TMPBG \ -e --force-clock \ --time-pos="ix-100:iy" \ --date-pos="tx:ty+25" \ --clock --date-str "%A, %d/%m/%Y" \ --inside-color=00000000 --ring-color=ffffffff --line-uses-inside \ --keyhl-color=d23c3dff --bshl-color=d23c3dff --separator-color=00000000 \ --insidever-color=fecf4dff --insidewrong-color=d23c3dff \ --ringver-color=ffffffff --ringwrong-color=ffffffff --ind-pos="x+290:h-120" \ --radius=20 --ring-width=3 \ --greeter-text="" --verif-text="" --wrong-text="" --noinput-text="" \ --greeter-color="ffffffff" --time-color="ffffffff" --date-color="ffffffff" rm $TMPBG