Skip to content

Commit

Permalink
osascript to open a new chrome window + url
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfoster committed Apr 16, 2014
1 parent f38f42f commit 2368655
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 10_chrome
@@ -0,0 +1,13 @@
if [[ -x '/Applications/Google Chrome.app' || -x "$HOME/Applications/Google Chrome.app" ]]; then
# Taken from http://apple.stackexchange.com/questions/9500/how-to-make-chrome-open-a-new-window-for-external-links and modified
function chromew {
URL=$1
osascript -e 'on run argv
tell application "Google Chrome"
make new window
activate
set URL of active tab of first window to item 1 of argv
end tell
end run' $URL
}
fi

0 comments on commit 2368655

Please sign in to comment.