Skip to content

Instantly share code, notes, and snippets.

@AlexVKO
Forked from jhickner/reload_chrome.sh
Created July 13, 2020 20:00
Show Gist options
  • Save AlexVKO/8d5a1df96cc5d1bdcb7506715a058704 to your computer and use it in GitHub Desktop.
Save AlexVKO/8d5a1df96cc5d1bdcb7506715a058704 to your computer and use it in GitHub Desktop.
Reload Chrome then refocus iTerm
#!/bin/sh
exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit
-- the above is some shell trickery that lets us write the rest of
-- the file in plain applescript
tell application "Google Chrome"
activate
tell application "System Events"
tell process "Google Chrome"
keystroke "r" using {command down, shift down}
end tell
end tell
end tell
tell application "iTerm" to activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment