revised locking for version 0.3.8

This commit is contained in:
Penelope Gwen 2025-01-04 18:38:46 -08:00
parent 3f86dd0848
commit 18a199cf11
2 changed files with 3 additions and 11 deletions

View file

@ -4,17 +4,6 @@ source "/usr/lib/sp-functions"
lock_script="${conf_dir}/lockscript"
unlock_script="${conf_dir}/unlockscript"
outputs=( $(swaymsg -t get_outputs | jq -r '.[] | {name} | "\(.name)"') )
for o in ${outputs[@]};do
workspace=$(swaymsg -t get_workspaces | jq -r '.[] | select(.output) | {name} | "\(.name)"')
wpno=$(cat "${cache_dir}/displays/${o}")
wp_imgpath="${conf_dir}/wallpaper/${o}/${wpno}.jpg"
sl_imgpath="${cache_dir}/lock/${o}.jpg"
convert -scale 10% -blur 0x3 -resize 500% "${wp_imgpath}" "${sl_imgpath}"
sl_args="${sl_args}--image ${o}:${sl_imgpath} "
done
if [ -f "${lock_script}" ]; then
bash -c "${lock_script}"
fi

View file

@ -11,6 +11,9 @@ setbg() {
for d in ${outputs[@]};do
d_wpno=$(cat "${cache_dir}/displays/${d}")
swaymsg output "${d}" bg "${conf_dir}/wallpaper/${d}/${d_wpno}.jpg" fill
wp_imgpath="${conf_dir}/wallpaper/${d}/${d_wpno}.jpg"
sl_imgpath="${cache_dir}/lock/${d}.jpg"
convert -scale 10% -blur 0x3 -resize 500% "${wp_imgpath}" "${sl_imgpath}" &
done
}