Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicholas-gh/372623 to your computer and use it in GitHub Desktop.
Save nicholas-gh/372623 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Please click on your browser"
BROWSER=$(xwininfo -int | awk '/Window id/ {print $4}')
while :; do
inotifywait -e close_write -r .
echo "Small sleep to let server restart..."
sleep 2
echo "Sending F5"
EDITOR=`xdotool getactivewindow`
xdotool windowactivate $BROWSER
xdotool key --window $BROWSER Escape
xdotool key --window $BROWSER F5
xdotool windowactivate $EDITOR
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment