Instead of starting one swaybg instance per output, only have one for all of them.
swaybarswaybg when an output is hotplugged or when the config is updatedswaybg easier to run on other compositors+1
We might also consider making the command line interface user-friendly
What about: swaybg -o <output> [-i <image> -m <mode> -c <color>] -o <another-output> etc. as CLI, with long options?
Also, would this mean that if no valid outputs are found, swaybg would continue to run in case a valid output is then hotplugged?
+1
Unfortunately, my above suggestion would break any other programs that can currently be used as swaybg_command.
I don't think we want to keep the current swaybg CLI interface.
We've never made any API stability promises about the swaybg interface. In fact...
This removes the need for the compositor to (re-)spawn or kill swaybg when an output is hotplugged or when the config is updated
If swaybg doesn't get (re-)spawned when the output config changes, wouldn't that require an IPC protocol or a wallpaper wayland protocol to obtain the change?
Yes. Let's keep it simple and restart on config change.
Most helpful comment
We might also consider making the command line interface user-friendly