Sway: Proposal: only one swaybg instance for all outputs

Created on 27 May 2018  路  9Comments  路  Source: swaywm/sway

Instead of starting one swaybg instance per output, only have one for all of them.

  • This is more consistent with swaybar
  • This removes the need for the compositor to (re-)spawn or kill swaybg when an output is hotplugged or when the config is updated
  • This makes swaybg easier to run on other compositors
enhancement

Most helpful comment

We might also consider making the command line interface user-friendly

All 9 comments

+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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jakubn551 picture jakubn551  路  4Comments

dnkl picture dnkl  路  4Comments

J0nnyMak0 picture J0nnyMak0  路  3Comments

WhyNotHugo picture WhyNotHugo  路  3Comments

Alphare picture Alphare  路  3Comments