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

Use wmctrl instead of xdotool for getting classname/activating windows #1

Open
perk11 opened this issue Nov 9, 2020 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@perk11
Copy link

perk11 commented Nov 9, 2020

Thanks for making this, I was about to write something like this and found it.

You are saying in readme that xdotool is the slow part. And I noticed that you already run wmctrl -l.

If you run wmctrl -l -x instead, that will return the list of windows with class name which should be parsable. You can also use wmctrl to activate windows with -a option, e.g. wmctrl -x -a class.name.goes.here and then you don't need to run xdotool at all.

@p3r7
Copy link
Member

p3r7 commented Nov 9, 2020

Hell yeah!

Didn't know about wmctrl -l -x. I'll do some test on my old 32bit laptop to see how it compared to xdotool search -classname <classname>, the hog.

Regarding using wmctrl to switch to the target window, I need to see how it behaves.
The xdotool windowactivate <window_id> isn't affecting performance much.

@p3r7 p3r7 added the enhancement New feature or request label Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants