revised locking for version 0.3.8
This commit is contained in:
parent
3f86dd0848
commit
18a199cf11
2 changed files with 3 additions and 11 deletions
11
bin/sp-lock
11
bin/sp-lock
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue