public
Last active

Reload Chrome then refocus iTerm

  • Download Gist
reload_chrome.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.