New backup 2024-04-15 23:30:02

This commit is contained in:
Penelope Gwen 2024-04-15 23:30:02 -06:00
parent 0392daa82d
commit ce45e27211

View file

@ -1,9 +1,13 @@
#!/bin/bash
output=$(swaymsg -t get_outputs | jq -r '.[] | {name} | "\(.name)"')
workspace=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | {name} | "\(.name)"')
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
#swaylock