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

Add xorg window manager detection with xprop #133

Merged
merged 3 commits into from
Feb 2, 2023
Merged

Add xorg window manager detection with xprop #133

merged 3 commits into from
Feb 2, 2023

Conversation

Gobidev
Copy link
Contributor

@Gobidev Gobidev commented Jan 31, 2023

Add another way of optaining the window manager name on Xorg using xprop.
This method works on most systems and uses a pre-installed command. If the detection with xprop fails, the previous method of using wmctrl will be tested and errors will only be returned if this also fails.

@grtcdr
Copy link
Member

grtcdr commented Feb 1, 2023

Although I'd love to see a Rust-native implementation so we can finally close #9, this is a welcome change, so thank you!

@Gobidev
Copy link
Contributor Author

Gobidev commented Feb 2, 2023

The only Rust-native implementation I can think of would be to scan /proc for known WMs, which would also work for wayland but could not detect WMs that are not hardcoded. However, we could then fallback to using xprop and/or wmctrl, maybe I will look into that in the future.

@grtcdr grtcdr merged commit 8f94e1f into Macchina-CLI:main Feb 2, 2023
xarblu pushed a commit to xarblu/libmacchina that referenced this pull request Mar 8, 2023
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