19 lines
798 B
Bash
19 lines
798 B
Bash
#!/usr/bin/env bash
|
|
|
|
# src:https://github.com/veltall/custom-i3lock
|
|
|
|
img_dir=/home/${USER}/.local/share/img
|
|
overlay_images=("ajp.png" "antiVax.png" "archLinux.png" "archLogo.png" "linuxLogo1.png" "linuxLogo2.png")
|
|
random_image_file=${overlay_images[ $RANDOM % ${#overlay_images[@]} ]}
|
|
random_image=${img_dir}/${random_image_file}
|
|
|
|
gravity=("center" "northwest" "northeast" "southwest" "southeast")
|
|
random_gravity=${gravity[ $RANDOM % ${#gravity[@]} ]}
|
|
|
|
notify-send "${random_image_file} @ ${random_gravity} ➔ coming up…"
|
|
|
|
scrot --display :0 --overwrite /tmp/currentworkspace.png
|
|
convert /tmp/currentworkspace.png -blur 0x1 /tmp/currentworkspaceblur.png
|
|
composite -gravity ${random_gravity} ${random_image} /tmp/currentworkspaceblur.png /tmp/lockbackground.png
|
|
i3lock -i /tmp/lockbackground.png
|