Skip to content

Instantly share code, notes, and snippets.

@zfenj
Created January 13, 2019 15:03
Show Gist options
  • Save zfenj/0307145f652a2b18398094e0f86076e6 to your computer and use it in GitHub Desktop.
Save zfenj/0307145f652a2b18398094e0f86076e6 to your computer and use it in GitHub Desktop.
xdotool: reload (second) browser window
# test: get ids of all open browser windows
wins=$(xdotool search --screen 0 --onlyvisible --class "qutebrowser")
echo $wins
# > 16777247
# > 16785319
# > 16786158
# get id of second window
win=$(xdotool search --screen 0 --onlyvisible --class "qutebrowser" | head -2 | tail -1)
echo $wins
# > 16785319
# ... head -1 for first id
# ... head -3 for third id
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment