2020-07-05 16:08:21 +01:00
|
|
|
#!/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 \
|
2023-12-27 15:47:21 +01:00
|
|
|
--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" \
|
2020-07-05 16:08:21 +01:00
|
|
|
--radius=20 --ring-width=3 \
|
2023-12-27 15:47:21 +01:00
|
|
|
--greeter-text="" --verif-text="" --wrong-text="" --noinput-text="" \
|
|
|
|
--greeter-color="ffffffff" --time-color="ffffffff" --date-color="ffffffff"
|
2020-07-05 16:08:21 +01:00
|
|
|
|
|
|
|
rm $TMPBG
|