Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Keep Connnect/Disconnect All at top

  • Loading branch information...
commit 04a3c6d3ccf1b120d6642e698c39cb665f1a70e8 1 parent 5ab8d82
@andrewschleifer authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 info.plist
View
9 info.plist
@@ -36,18 +36,17 @@
<key>keyword</key>
<string>vpn</string>
<key>script</key>
- <string>FILTER="{query}"
+ <string>STAMP=$(date +%s)
+FILTER="{query}"
if [ -z "$FILTER" ]; then FILTER=.;fi
echo '&lt;?xml version="1.0"?&gt;&lt;items&gt;'
-STAMP=$(date +%s)
-
-osascript -sh connections.ascr | tr "\r" "\n" | grep -i $FILTER | while read LINE; do echo "&lt;item uid=\"${STAMP}\" arg=\"${LINE}\"&gt;&lt;title&gt;${LINE}&lt;/title&gt;&lt;subtitle&gt;Toggle this connection&lt;/subtitle&gt;&lt;icon&gt;icon.png&lt;/icon&gt;&lt;valid&gt;yes&lt;/valid&gt;&lt;/item&gt;"; done
-
echo '&lt;item uid="'${STAMP}'" arg="connectall"&gt;&lt;title&gt;Connect All&lt;/title&gt;&lt;subtitle&gt;Connect to all defined networks&lt;/subtitle&gt;&lt;icon&gt;icon.png&lt;/icon&gt;&lt;valid&gt;yes&lt;/valid&gt;&lt;/item&gt;'
echo '&lt;item uid="'${STAMP}'" arg="disconnectall"&gt;&lt;title&gt;Disconnect All&lt;/title&gt;&lt;subtitle&gt;Disconnect from all connected networks&lt;/subtitle&gt;&lt;icon&gt;icon.png&lt;/icon&gt;&lt;valid&gt;yes&lt;/valid&gt;&lt;/item&gt;'
+osascript -sh connections.ascr | tr "\r" "\n" | grep -i $FILTER | while read LINE; do echo "&lt;item uid=\"${STAMP}\" arg=\"${LINE}\"&gt;&lt;title&gt;${LINE}&lt;/title&gt;&lt;subtitle&gt;Toggle this connection&lt;/subtitle&gt;&lt;icon&gt;icon.png&lt;/icon&gt;&lt;valid&gt;yes&lt;/valid&gt;&lt;/item&gt;"; done
+
echo '&lt;/items&gt;'
</string>
<key>subtext</key>
Please sign in to comment.
Something went wrong with that request. Please try again.