💾 Archived View for ait.place › dot › bin › .local › bin › bspc_wallpaper.txt captured on 2021-12-03 at 14:04:38.

View Raw

More Information

-=-=-=-=-=-=-

#!/bin/sh
# This is a scuffed script that changes wallpaper with feh based on what desktop you are focused on.
# Create a folder in "Pictures" folder called Bspwm. There have wallpapers that count from 0 to whatever number of desktops you have, in my case its 9.

WALLPAPERS="$HOME/pic/Bspwm/dual/"
bspc subscribe desktop_focus | while read -r line; do
	bspc query -D | while read -r inc; do
		i=$((i+1))
		[  "$inc" = "${line##* }" ] && xwallpaper --no-randr --center "$WALLPAPERS$i.png" &
	done
done