Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config output id doesn't match swaybg #7172

Open
yorickvP opened this issue Sep 15, 2022 · 4 comments
Open

Config output id doesn't match swaybg #7172

yorickvP opened this issue Sep 15, 2022 · 4 comments
Labels
bug Not working as intended

Comments

@yorickvP
Copy link
Contributor

Please fill out the following:

  • Sway Version: 1c368fb

  • Configuration File:

# needed for position to work
output "HYC CO., LTD.  Unknown" {
   bg /home/yorick/wp/beyond-4k-2560×1440.jpg fill
   position 0 0
}
# needed for bg to work
output "HYC CO., LTD.  " {
   bg /home/yorick/wp/beyond-4k-2560×1440.jpg fill
   position 0 0
}
$ swaymsg -t get_outputs
Output DVI-D-1 'HYC CO., LTD.  Unknown'
$ swaybg
2022-09-15 09:55:00 - [main.c:260] Found config HYC CO., LTD.  for output DVI-D-1 (HYC CO., LTD. )
  • Description:
    Handle NULL output make/model/serial #7031 changed the output description that's used to match config sections, but didn't update the wl_output::description that's used in swaybg. This causes a mismatch between these settings, causing the bg not to show in some cases.
@yorickvP yorickvP added the bug Not working as intended label Sep 15, 2022
@emersion
Copy link
Member

Hm, right. The root cause is that swaybg uses a hack to match output identifiers: https://github.com/swaywm/swaybg/blob/c9608982d2a8bf0e70291a7a1b8cade1ca06f36f/main.c#L303

@emersion emersion added this to the 1.8 milestone Sep 15, 2022
@emersion
Copy link
Member

Duplicate of swaywm/swaybg#44

@emersion emersion marked this as a duplicate of swaywm/swaybg#44 Sep 16, 2022
@emersion emersion removed this from the 1.8 milestone Nov 11, 2022
@mstoeckl
Copy link
Contributor

mstoeckl commented Dec 30, 2023

If we were to ignore backwards compatibility entirely, one way to fix this would be make Sway adopt the wlroots output description value for its output identifiers everywhere. (That is, the value which swaybg receives through the wl_output::description event) See for example the following patch 0001-Use-the-wlroots-wl_output-description-as-output-iden.patch.txt. There probably is a better solution that I haven't thought of, so I'm not planning on making a PR out of the patch myself.

@emersion
Copy link
Member

I'd prefer not to rely on the output description, because this makes swaybg incompatible with any compositor which uses a different format (either non-wlroots, or a wlroots compositor which sets a custom output description).

More discussions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants