Skip to content

Commit

Permalink
use bash instead of php
Browse files Browse the repository at this point in the history
  • Loading branch information
lukdiekm committed Jul 28, 2021
1 parent be52151 commit 5f2faae
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
64 changes: 38 additions & 26 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,29 @@
<string>macOS Shortcuts</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>shortcuts run "$1"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>5</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>89622087-1E5E-418B-B4C3-24565FCD0936</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -60,7 +83,19 @@
<key>runningsubtext</key>
<string></string>
<key>script</key>
<string>/usr/local/bin/php ./listShortcuts.php</string>
<string>printf "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;items&gt;"
IFS=''
shortcuts list |
while read shortcut
do
printf "&lt;item uid=\"%s\" valid=\"YES\" autocomplete=\"%s\"&gt;" $shortcut $shortcut
printf "&lt;title&gt;%s&lt;/title&gt;" $shortcut
printf "&lt;subtitle&gt;%s&lt;/subtitle&gt;" $shortcut
printf "&lt;icon&gt;sc-icon.png&lt;/icon&gt;"
printf "&lt;arg&gt;%s&lt;/arg&gt;" $shortcut
printf "&lt;/item&gt;"
done
echo "&lt;/items&gt;"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
Expand All @@ -70,7 +105,7 @@
<key>title</key>
<string>Shortcuts</string>
<key>type</key>
<integer>0</integer>
<integer>5</integer>
<key>withspace</key>
<false/>
</dict>
Expand All @@ -81,29 +116,6 @@
<key>version</key>
<integer>3</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>shortcuts run "$1"</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>5</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>89622087-1E5E-418B-B4C3-24565FCD0936</string>
<key>version</key>
<integer>2</integer>
</dict>
</array>
<key>readme</key>
<string></string>
Expand All @@ -127,7 +139,7 @@
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>0.1</string>
<string>0.2</string>
<key>webaddress</key>
<string></string>
</dict>
Expand Down
12 changes: 0 additions & 12 deletions listShortcuts.php

This file was deleted.

0 comments on commit 5f2faae

Please # to comment.