gcollazo / gcollazo/BrowserRefresh-Sublime

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

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
560
Forks
57
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.