Skip to content

Instantly share code, notes, and snippets.

@vrld
Created July 9, 2019 08:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrld/ec7c4f8a6216816e3eea1aa56b0746b7 to your computer and use it in GitHub Desktop.
Save vrld/ec7c4f8a6216816e3eea1aa56b0746b7 to your computer and use it in GitHub Desktop.
Refresh firefox window with xdotool
#!/bin/sh
ACTIVE_WINDOW=$(xdotool getactivewindow)
if [ -z "${1}" ]; then
xdotool search --classname Navigator windowactivate --sync key --clearmodifiers "ctrl+F5"
else
xdotool search --classname Navigator search --name $1 windowactivate --sync key --clearmodifiers "ctrl+F5"
fi
xdotool windowactivate --sync ${ACTIVE_WINDOW}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment