dotfiles/de/home/.config/sway/scripts/wallpaper
2024-04-09 17:45:04 -06:00

8 lines
323 B
Bash
Executable file

#!/bin/bash
swaymsg -r -t subscribe -m '["workspace"]' | jq -rc --unbuffered 'select(.change == "focus") | .current | "\(.name) \(.output)"' | while read name output;do
# kill $!
wsno=$(echo "$name" | awk '{print $1}')
echo $wsno
# swaybg -i "$HOME/.config/sway/assets/wallpaper/eDP-1/$name.jpg" -o "$output" &
done