forked from giginet/alfred-autojump-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.plist
139 lines (131 loc) · 3.44 KB
/
info.plist
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
<?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">
<dict>
<key>bundleid</key>
<string>org.kawaz.dash.workflow</string>
<key>category</key>
<string>Tools</string>
<key>connections</key>
<dict>
<key>418ED302-B482-4959-9DB7-2FF667AA0C9A</key>
<array>
<dict>
<key>destinationuid</key>
<string>18B95FFB-E89F-4108-99A8-2BB887A59221</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>giginet</string>
<key>description</key>
<string>Search directory via autojump</string>
<key>disabled</key>
<false/>
<key>name</key>
<string>Autojump</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>0</integer>
<key>escaping</key>
<integer>127</integer>
<key>keyword</key>
<string>j</string>
<key>script</key>
<string>import commands
import re
import os
from feedback import Feedback
os.putenv('AUTOJUMP_SOURCED', '1')
IMG = os.path.join('autojump', 'bin', 'icon.png')
AUTOJUMP = os.path.join('autojump', 'bin', 'autojump')
COMMAND = '%s --complete %s'
query = '{query}'
fb = Feedback()
directories = commands.getoutput(COMMAND % (AUTOJUMP, query))
if directories:
candidates = directories.split('\n')
for dir in candidates:
match = re.match(r'^(.+?)__[1-9]__(?P<path>/.+)$', dir)
if match:
path = match.group('path')
fb.add_item("Open %s" % path, arg=path, icon=IMG)
print fb
else:
stats = commands.getoutput('autojump/bin/autojump -s')
candidates = reversed(stats.split('\n'))
for dir in candidates:
match = re.match(r'^\d+\.\d:\s+(?P<path>/.+)$', dir)
if match:
path = match.group('path')
fb.add_item('Open %s' % path, arg=path, icon=IMG)
print fb
</string>
<key>subtext</key>
<string>Jump contains "..."</string>
<key>title</key>
<string>Open with autojump</string>
<key>type</key>
<integer>3</integer>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.scriptfilter</string>
<key>uid</key>
<string>418ED302-B482-4959-9DB7-2FF667AA0C9A</string>
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>escaping</key>
<integer>127</integer>
<key>script</key>
<string>import os
import commands
AUTOJUMP = 'autojump/bin/autojump'
query = '{query}'
abspath = os.path.abspath(AUTOJUMP)
os.chdir(query)
out = commands.getoutput('python %s -i' % abspath)
commands.getoutput('open %s' % query)</string>
<key>type</key>
<integer>3</integer>
</dict>
<key>type</key>
<string>alfred.workflow.output.script</string>
<key>uid</key>
<string>18B95FFB-E89F-4108-99A8-2BB887A59221</string>
<key>version</key>
<integer>0</integer>
</dict>
</array>
<key>readme</key>
<string>This is an Alfred 2 workflow to provide you a faster way to navigate your filesystem via autojump(https://github.com/joelthelion/autojump)</string>
<key>uidata</key>
<dict>
<key>18B95FFB-E89F-4108-99A8-2BB887A59221</key>
<dict>
<key>ypos</key>
<real>10</real>
</dict>
<key>418ED302-B482-4959-9DB7-2FF667AA0C9A</key>
<dict>
<key>ypos</key>
<real>10</real>
</dict>
</dict>
<key>webaddress</key>
<string>http://giginet.hateblo.jp/entry/2014/06/26/113624</string>
</dict>
</plist>