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

Linux xdotool hangs if window type not found (not opened) -> subl hangs #83

Open
Kwaadpepper opened this issue Sep 23, 2015 · 0 comments

Comments

@Kwaadpepper
Copy link

Plugin is working firefox and firefox-trunk.
the following command xdotool search --sync --onlyvisible --class chromium windowfocus key F5
is working however inputing chromium in browsers won't make chromium to load.
That is for a linux up to date status.

Now for this issue if xdotool do not find window class it hangs until it is opened.
This is because of the --sync.

Another issue is duplicate and --onlyvisible not working : firefox has invisible windows sometimes. So what you have to do is send key to all match results.
This command is much more effective:
xdotool search --onlyvisible --class firefox | while read w; do xdotool key --window $w F5; done
How ever if you have firefox-trunk and firefox it will send to both windows.

wmctrl dos not seem to have this oddbehaviour:
xdotool key --window $(wmctrl -l | grep -ie 'firefox' | awk "/$title/ {print "'$1}') F5

This is the best solution i've found. It supports all navigators based on their name, for example having firefox-trunk, we could use nigthly so the refresh will be sent only to nigthly.
It also works with chromium, it avoids the deadlock described above.

I'm not a python guy but i will try to make a pull request for this.

sk8darr added a commit to sk8darr/BrowserRefresh-Sublime that referenced this issue Aug 22, 2016
This update fix a bug in xdotool command call. Code by @Kwaadpepper in [Linux xdotool hangs if window type not found (not opened) -> subl hangs gcollazo#83]
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

Successfully merging a pull request may close this issue.

1 participant