From f7498cf11733a375e2a70e5139659d10036faf0c Mon Sep 17 00:00:00 2001 From: ivan-boikov Date: Sun, 22 May 2022 22:30:45 +0200 Subject: new wallpapers, simplified locking script --- scripts/.local/bin/ilock | 40 ++++++++++++++++++++++++++++++++++++++++ scripts/.local/bin/lock | 40 ---------------------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100755 scripts/.local/bin/ilock delete mode 100755 scripts/.local/bin/lock (limited to 'scripts/.local') diff --git a/scripts/.local/bin/ilock b/scripts/.local/bin/ilock new file mode 100755 index 0000000..6450407 --- /dev/null +++ b/scripts/.local/bin/ilock @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +icon="$HOME/.local/share/icons/lock.png" +pngfile='/tmp/screen.png' +bmpfile='/tmp/screen.bmp' +glitchedfile="/tmp/sclock_g.bmp" + +(( $# )) && { icon=$1; } + +# 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" diff --git a/scripts/.local/bin/lock b/scripts/.local/bin/lock deleted file mode 100755 index 6450407..0000000 --- a/scripts/.local/bin/lock +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -icon="$HOME/.local/share/icons/lock.png" -pngfile='/tmp/screen.png' -bmpfile='/tmp/screen.bmp' -glitchedfile="/tmp/sclock_g.bmp" - -(( $# )) && { icon=$1; } - -# 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" -- cgit v1.2.3