mirror of https://github.com/captn3m0/Scripts.git
i3lock update
This commit is contained in:
parent
96c6b10ef6
commit
ce297e9189
Binary file not shown.
After Width: | Height: | Size: 1.9 MiB |
48
i3lock.sh
48
i3lock.sh
|
@ -3,32 +3,30 @@ cd ~/projects/scripts
|
||||||
xset -b #disable scrot beep
|
xset -b #disable scrot beep
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Dependencies: imagemagick, i3lock-color-git, scrot
|
# Now that the rest of the images have been generated
|
||||||
|
# We can just call it using that
|
||||||
IMAGE=$(mktemp).png
|
|
||||||
#TEXT="Type password to unlock"
|
|
||||||
|
|
||||||
#VALUE="60" #brightness value to compare to
|
|
||||||
scrot $IMAGE
|
|
||||||
|
|
||||||
# pixelate: -scale 10% -scale 1000%
|
|
||||||
# if [ "$COLOR" -gt "$VALUE" ]; then #white background image and black text
|
|
||||||
# convert $IMAGE -level 0%,100%,0.6 -filter Gaussian -resize 20% -define filter:sigma=1.5 -resize 500% - | composite lockscreen.png - -compose over $IMAGE
|
|
||||||
# PARAM='--textcolor=00000000 --insidecolor=0000001c --ringcolor=0000003e --linecolor=00000000 --keyhlcolor=ffffff80 --ringvercolor=ffffff00 --insidevercolor=ffffff1c --ringwrongcolor=ffffff55 --insidewrongcolor=ffffff1c'
|
|
||||||
# else #black
|
|
||||||
# convert $IMAGE -level 0%,100%,0.6 -filter Gaussian -resize 20% -define filter:sigma=1.5 -resize 500% - | composite lockscreen.png - -compose over $IMAGE
|
|
||||||
# PARAM='--textcolor=ffffff00 --insidecolor=ffffff1c --ringcolor=ffffff3e --linecolor=ffffff00 --keyhlcolor=00000080 --ringvercolor=00000000 --insidevercolor=0000001c --ringwrongcolor=00000055 --insidewrongcolor=0000001c'
|
|
||||||
# fi
|
|
||||||
|
|
||||||
convert $IMAGE -level 0%,100%,0.6 -filter Gaussian -resize 20% -define filter:sigma=1.5 -resize 500% - | composite lockscreen.png - -compose over $IMAGE
|
|
||||||
PARAM='--textcolor=00000000 --insidecolor=0000001c --ringcolor=0000003e --linecolor=00000000 --keyhlcolor=ffffff80 --ringvercolor=ffffff00 --insidevercolor=ffffff1c --ringwrongcolor=ffffff55 --insidewrongcolor=ffffff1c'
|
PARAM='--textcolor=00000000 --insidecolor=0000001c --ringcolor=0000003e --linecolor=00000000 --keyhlcolor=ffffff80 --ringvercolor=ffffff00 --insidevercolor=ffffff1c --ringwrongcolor=ffffff55 --insidewrongcolor=ffffff1c'
|
||||||
|
IMAGE_COMPOSITE="composite_office_lockscreen.png"
|
||||||
|
|
||||||
# try to use a forked version of i3lock with prepared parameters
|
i3lock $PARAM -i $IMAGE_COMPOSITE
|
||||||
i3lock $PARAM -i $IMAGE > /dev/null 2>&1
|
exit
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
# Dependencies: imagemagick, i3lock-color-git, scrot
|
||||||
# We have failed, lets get back to stock one
|
function generate_composite_image()
|
||||||
i3lock -i $IMAGE
|
{
|
||||||
fi
|
#IMAGE=$(mktemp).png
|
||||||
|
IMAGE_BASE="/home/nemo/Pictures/office_screen_lock.png"
|
||||||
|
IMAGE_TEMP="/tmp/tmp_lockscreen.png"
|
||||||
|
cp $IMAGE_BASE $IMAGE_TEMP
|
||||||
|
#scrot $IMAGE
|
||||||
|
|
||||||
rm $IMAGE
|
convert $IMAGE_TEMP -level 0%,100%,0.6 -filter Gaussian -resize 20% -define filter:sigma=1.5 -resize 500% - | composite lockscreen_office.png - -compose over $IMAGE_TEMP
|
||||||
|
|
||||||
|
# try to use a forked version of i3lock with prepared parameters
|
||||||
|
i3lock $PARAM -i $IMAGE_TEMP > /dev/null 2>&1
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
# We have failed, lets get back to stock one
|
||||||
|
i3lock -i $IMAGE
|
||||||
|
fi
|
||||||
|
}
|
BIN
lock-icon.png
BIN
lock-icon.png
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue