Keyboard Maestro macro to open the current URL in Safari in Google Chrome

  • Download Gist
Open Safari URL in Google Chrome.kmmacros
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>IsActive</key>
<true/>
<key>IsDisclosed</key>
<true/>
<key>MacroActionType</key>
<string>SelectMenuItem</string>
<key>Menu</key>
<array>
<string>File</string>
<string>Open Location…</string>
</array>
<key>StopOnFailure</key>
<true/>
<key>TargetApplication</key>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.Safari</string>
<key>Creator</key>
<integer>1936093801</integer>
<key>FileType</key>
<integer>1095782476</integer>
<key>Name</key>
<string>Safari.app</string>
<key>NewFile</key>
<string>/Applications/Safari.app</string>
</dict>
<key>TargetingType</key>
<string>Specific</string>
</dict>
<dict>
<key>IsActive</key>
<true/>
<key>IsDisclosed</key>
<true/>
<key>MacroActionType</key>
<string>SelectMenuItem</string>
<key>Menu</key>
<array>
<string>Edit</string>
<string>Cut</string>
</array>
<key>StopOnFailure</key>
<true/>
<key>TargetApplication</key>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.Safari</string>
<key>Creator</key>
<integer>1936093801</integer>
<key>FileType</key>
<integer>1095782476</integer>
<key>Name</key>
<string>Safari.app</string>
<key>NewFile</key>
<string>/Applications/Safari.app</string>
</dict>
<key>TargetingType</key>
<string>Specific</string>
</dict>
<dict>
<key>DisplayKind</key>
<string>Window</string>
<key>IsActive</key>
<true/>
<key>IsDisclosed</key>
<true/>
<key>MacroActionType</key>
<string>ExecuteShellScript</string>
<key>Path</key>
<string></string>
<key>Text</key>
<string>URL="$(pbpaste)"
 
open -a 'Google Chrome' "$URL" &amp;&amp; exit 0
 
echo "Keyboard Maestro: failed to open $URL in Google Chrome"
 
exit 1
</string>
<key>TimeOutAbortsMacro</key>
<true/>
<key>TrimResults</key>
<true/>
<key>UseText</key>
<true/>
<key>Variable</key>
<string>Variable</string>
</dict>
</array>
<key>IsActive</key>
<true/>
<key>Name</key>
<string>Open Safari URL in Google Chrome</string>
<key>Triggers</key>
<array>
<dict>
<key>FireType</key>
<string>Pressed</string>
<key>KeyCode</key>
<integer>5</integer>
<key>MacroTriggerType</key>
<string>HotKey</string>
<key>Modifiers</key>
<integer>2048</integer>
<key>TriggerRepeat</key>
<false/>
</dict>
</array>
<key>UID</key>
<string>D8F3AF8F-6298-41B2-980F-4AEFE5DF3505</string>
</dict>
</array>
<key>Name</key>
<string>Only in -&gt; Safari </string>
<key>Targeting</key>
<dict>
<key>Targeting</key>
<string>Included</string>
<key>TargetingApps</key>
<array>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.Safari</string>
<key>Creator</key>
<integer>1936093801</integer>
<key>FileType</key>
<integer>1095782476</integer>
<key>Name</key>
<string>Safari.app</string>
<key>NewFile</key>
<string>/Applications/Safari.app</string>
</dict>
</array>
</dict>
<key>UID</key>
<string>68618F4B-67CA-461B-97C5-C0A6707EA499</string>
</dict>
</array>
</plist>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.