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

Support output IDs #368

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support output IDs #368

wants to merge 3 commits into from

Conversation

wille
Copy link

@wille wille commented Aug 1, 2024

I need to support targeting the output with the output identifier (Dell Inc. DELL U3223QE GB6Y9P3) rather than just the output name (eg. DP-6) because the output name might change every time I replug my monitors and I want my internal OLED display to have no image while my external monitors should have a nice image.

Example:
swaylock -f -c 000000 --image "Dell Inc. DELL U3223QE GB6Y9P3":~/Pictures/1.jpg -d

The wl_output_description returns the full model, make and output name so I am trimming the output name from the output description to match kanshi and sway output id matching.

@emersion
Copy link
Member

emersion commented Aug 1, 2024

Unfortunately, this adds assumptions about the format of the output description which are unreliable and non-portable across compositors. I'd rather not do that.

@wille
Copy link
Author

wille commented Aug 1, 2024

You're definitively right, I was wondering if you can point me in the right direction to reliably get this ID just as in Kanshi or sway output

@emersion
Copy link
Member

emersion commented Aug 1, 2024

Sadly there is no way to get this information. I'm not sure just adding an event to pass it to clients is a good way forward, an opaque tag might be better, see the discussions in https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/109#note_970789

@wille
Copy link
Author

wille commented Aug 2, 2024

Sorry I don't follow, both sway and kanshi supports targeting the output by the identifier which I want to do here as well.

I just pushed a new commit to simply check if the output description contains the output name provided to --image, so --image "Dell Inc. DELL U3223QE GB6Y9P3":~/Pictures/1.jpg would match the output_descripton Dell Inc. DELL U3223QE GB6Y9P3 (DP-X)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants