diff options
| author | --global <ik.boikov.public@protonmail.com> | 2021-08-16 22:55:37 +0200 |
|---|---|---|
| committer | --global <ik.boikov.public@protonmail.com> | 2021-08-16 22:55:37 +0200 |
| commit | 467648e0faaf0b1a0a0967a9faa85af20c7c0966 (patch) | |
| tree | ae7905bc81efe38fcdfeab701e6f57c91cd51f84 /scripts | |
| parent | d79001efe39755aeeb646cd48e59cc684b771b7c (diff) | |
distorted lock screen, pass-git-helper
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/.local/bin/lock | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/scripts/.local/bin/lock b/scripts/.local/bin/lock index 5bea750..6450407 100755 --- a/scripts/.local/bin/lock +++ b/scripts/.local/bin/lock @@ -1,12 +1,40 @@ #!/usr/bin/env bash icon="$HOME/.local/share/icons/lock.png" -tmpbg='/tmp/screen.png' +pngfile='/tmp/screen.png' +bmpfile='/tmp/screen.bmp' +glitchedfile="/tmp/sclock_g.bmp" (( $# )) && { icon=$1; } -rm "$tmpbg" -maim > "$tmpbg" -convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg" -convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg" -i3lock -u -i "$tmpbg" +# flush keyring passwords +gnome-keyring-daemon -r -d + +# generate fancy lock screen +rm "$pngfile" +maim > "$pngfile" + +# old method +#convert "$pngfile" -scale 5% -scale 2000% "$pngfile" + +# new method with heavy distortion +convert -rotate -90 $pngfile $bmpfile +for a in {1,2,4,5,2} +do + # Glitch it with sox FROM: https://maryknize.com/blog/glitch_art_with_sox_imagemagick_and_vim/ + sox -t ul -c 1 -r 48k $bmpfile -t ul $glitchedfile trim 0 90s : echo 0.2 0.3 $((a*3)) 0.7 + # Rotate it by 90 degrees + convert -scale $((100/(a)))% -scale $((100*(a)))% -rotate 90 $glitchedfile $bmpfile +done +convert -gamma 0.1 -gravity center -font "Liberation-Mono" \ + -pointsize 200 -channel RGBA -fill '#bf616a' \ + $bmpfile $pngfile + +convert "$pngfile" "$icon" -gravity center -composite -matte "$pngfile" + + +playerctl pause + +#sxiv $pngfile + +i3lock -u -i "$pngfile" |
