13 lines
501 B
Bash
Executable file
13 lines
501 B
Bash
Executable file
#!/bin/bash
|
|
|
|
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)"')
|
|
done
|
|
|
|
wpno=$(printf "%02d\n" $(($(echo "${workspace}" | awk '{print $1}' | grep -o "^[1-9]*")-1)) | cut -c 1 | sed 's/[^0-9]*//g')
|
|
wp_path="$HOME/.config/sway/assets/wallpaper/${output}/${wpno}.jpg"
|
|
|
|
convert -scale 10% -blur 0x3 -resize 500% ${wp_path} $HOME/.cache/swaylock/bg.png
|
|
#swaylock
|