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

atomx: WM_CLASS only returns the instance value (not class) #69

Open
Aicaya opened this issue Oct 6, 2022 · 2 comments
Open

atomx: WM_CLASS only returns the instance value (not class) #69

Aicaya opened this issue Oct 6, 2022 · 2 comments

Comments

@Aicaya
Copy link

Aicaya commented Oct 6, 2022

Pretty much what the title says: WM_CLASS contains two strings (instance, class), but atomx WM_CLASS $(pfw) only returns the first of them (the instance).

Found out while writing window rules for a wmutils-only setup. Currently making-do with xprop -id "$wid" WM_CLASS and a bunch of clean-up, but having atomx output both would help simplify things.

@lwilletts
Copy link
Contributor

Agreed. An example I found was picom expected class from your example when defining classes e.g. for opacity rules.

@z3bra
Copy link
Contributor

z3bra commented Oct 9, 2022

It seems like the atom value returned sends the class and instance terminated with a nullbyte. Currently atomx simply prints the value with printf(3), so the first nullbyte (after the class name) marks the end of the string. Printing the instance name would require printing the whole data returned, either by writing the full data to stout (including the intermediate null bytes), or iterating through the whole data, and reformatting it. Not sure how it should be formatted though (tab separated, new line, ...?).

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

No branches or pull requests

3 participants