Add lockscreen script for i3-lock-colors
Script screenshots current screen, blurs it and add a black rectangle for i3-lock info. i3-lock parameters mainly set up colors and position
This commit is contained in:
parent
8355b7a711
commit
93d70d6295
1 changed files with 36 additions and 0 deletions
36
Perso/i3-lockscreenshot.sh
Executable file
36
Perso/i3-lockscreenshot.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/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 \
|
||||
--timepos="ix-100:iy" \
|
||||
--datepos="tx:ty+25" \
|
||||
--clock --datestr "%A, %d/%m/%Y" \
|
||||
--insidecolor=00000000 --ringcolor=ffffffff --line-uses-inside \
|
||||
--keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 \
|
||||
--insidevercolor=fecf4dff --insidewrongcolor=d23c3dff \
|
||||
--ringvercolor=ffffffff --ringwrongcolor=ffffffff --indpos="x+290:h-120" \
|
||||
--radius=20 --ring-width=3 \
|
||||
--greetertext="" --veriftext="" --wrongtext="" --noinputtext="" \
|
||||
--greetercolor="ffffffff" --timecolor="ffffffff" --datecolor="ffffffff"
|
||||
|
||||
rm $TMPBG
|
Loading…
Add table
Reference in a new issue