Skip to content

Commit

Permalink
Use Alfred's "Open URL" action for pin and annotate
Browse files Browse the repository at this point in the history
Big Sur's `open -g <url>` doesn't do any URL encoding.
The one on Catalina does. As a consequence, the following
works on Catalina, but not on Big Sur:
  open -g "cleanshot://share-extension-pin?filepath=/path/with spaces.png"

Given that the only reason to not use Alfred's bulit-in
"Open URL" action in the first place was because it has
weird behavior with "show/hide desktop icons", it makes sense
to just use that action for the pin/annotate cases.
  • Loading branch information
mr-pennyworth committed Jun 3, 2021
1 parent c7fe96b commit 8ac883c
Showing 1 changed file with 23 additions and 27 deletions.
50 changes: 23 additions & 27 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<array>
<dict>
<key>destinationuid</key>
<string>A3937EC6-8CC7-42A1-AD6E-FDA4FC5B73F4</string>
<string>28F2FE1A-CFFB-485B-89F2-28C683D2ECD1</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
Expand All @@ -101,7 +101,7 @@
<array>
<dict>
<key>destinationuid</key>
<string>A3937EC6-8CC7-42A1-AD6E-FDA4FC5B73F4</string>
<string>28F2FE1A-CFFB-485B-89F2-28C683D2ECD1</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
Expand Down Expand Up @@ -320,29 +320,6 @@
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>open "cleanshot://$action?filepath=$1"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>A3937EC6-8CC7-42A1-AD6E-FDA4FC5B73F4</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -449,6 +426,25 @@ open -g "cleanshot://$1"</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>browser</key>
<string></string>
<key>spaces</key>
<string></string>
<key>url</key>
<string>cleanshot://{var:action}?filepath={query}</string>
<key>utf8</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.action.openurl</string>
<key>uid</key>
<string>28F2FE1A-CFFB-485B-89F2-28C683D2ECD1</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -708,7 +704,7 @@ open -g "cleanshot://$1"</string>
<key>ypos</key>
<integer>225</integer>
</dict>
<key>A3937EC6-8CC7-42A1-AD6E-FDA4FC5B73F4</key>
<key>28F2FE1A-CFFB-485B-89F2-28C683D2ECD1</key>
<dict>
<key>xpos</key>
<integer>735</integer>
Expand All @@ -733,7 +729,7 @@ open -g "cleanshot://$1"</string>
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>0.0.4</string>
<string>0.0.5</string>
<key>webaddress</key>
<string>https://github.com/mr-pennyworth/alfred-cleanshot</string>
</dict>
Expand Down

0 comments on commit 8ac883c

Please sign in to comment.