Skip to content

Commit c3e0f62

Browse files
author
Terje Bratlie
committed
remove unload for 0.0.5.4
1 parent 4eb2066 commit c3e0f62

18 files changed

+25
-62
lines changed

application.py

-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@
88
}
99

1010
ctx.keymap(keymap)
11-
12-
13-
def unload(): ctx.unload()

audio.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def previous_track(m):
7171
def set_volume(m):
7272
volume = text_to_number(m)
7373
if volume == -1:
74-
return
74+
return # Give notification when that is supported
7575

7676
volume = str(volume)
7777
script = '''tell app "Spotify" to set sound volume to ''' + volume
@@ -98,6 +98,3 @@ def set_system_volume(m):
9898

9999

100100
ctx.keymap(keymap)
101-
102-
103-
def unload(): ctx.unload()

autosleep.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from talon.engine import engine
22

3+
34
def on_status(topic, j):
45
if j['cmd'] == 'mic' and j['status'] == 'on':
56
print('mic turned on, mimic "go to sleep"')
67
engine.mimic('go to sleep')
78

8-
engine.register('status', on_status)
99

10-
def unload(): engine.unregister('status', on_status)
10+
engine.register('status', on_status)

code.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from talon.voice import Context, Key
22

3-
languages = ['.php', '.py', '.java']
3+
languages = ['.php', '.py', '.java', '.yml', '.json']
44
bundles = ['com.postmanlabs.mac']
55

66
ctx = Context('code', func=lambda app, win:
@@ -63,6 +63,3 @@
6363
}
6464

6565
ctx.keymap(keymap)
66-
67-
68-
def unload(): ctx.unload()

editing.py

-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@
99
}
1010

1111
ctx.keymap(keymap)
12-
13-
14-
def unload(): ctx.unload()

iterm.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ctx = Context('iterm', bundle='com.googlecode.iterm2')
44

55
keymap = {
6-
'full-screen': Key('cmd-shift-enter'),
6+
'[toggle] full-screen': Key('cmd-shift-enter'),
77
'exit session': [Key('ctrl-c'), 'exit\n'],
88
'broadcaster': Key('cmd-alt-i'),
99
'clear session': [Key('ctrl-c'), 'clear\n'],
@@ -12,6 +12,3 @@
1212
}
1313

1414
ctx.keymap(keymap)
15-
16-
17-
def unload(): ctx.unload()

java.py

-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@
1313
}
1414

1515
ctx.keymap(keymap)
16-
17-
18-
def unload(): ctx.unload()

jetbrains.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
keymap = {
88
'comment declaration': ['/**', Key('space')],
99
'comment block': ['/**', Key('enter')],
10+
# annotation command
11+
12+
'(next tab | goneck)': Key('cmd-shift-['),
13+
'(last tab | gopreev)': Key('cmd-shift-]'),
14+
'last file': Key('ctrl-tab'),
1015

1116
'jolt': Key('cmd-d'),
1217
'comply': Key('tab'),
@@ -20,9 +25,9 @@
2025
'refactor': Key('shift-f6'),
2126
'generate': Key('cmd-n'),
2227
'recent': Key('cmd-e'),
28+
'trundle': Key('cmd-/'),
29+
'(fix imports | remove unused imports)': Key('ctrl-alt-o'),
30+
'complete [statement]': Key('cmd-shift-enter'),
2331
}
2432

2533
ctx.keymap(keymap)
26-
27-
28-
def unload(): ctx.unload()

navigation.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
'new window': Key('cmd-n'),
1414
'(next window | gibby)': Key('cmd-`'),
1515
'(last window | shibby)': Key('cmd-shift-`'),
16-
'(next tab | goneck)': Key('ctrl-tab'),
17-
'(last tab | gopreev)': Key('ctrl-shift-tab'),
1816
'next space': Key('cmd-alt-ctrl-right'),
1917
'last space': Key('cmd-alt-ctrl-left'),
2018

@@ -24,7 +22,7 @@
2422
# '(new tab | peach)': Key('cmd-t'),
2523

2624
# deleting
27-
'snipline': Key('cmd-right cmd-backspace'),
25+
'(snipline | delete line)': Key('cmd-right cmd-backspace'),
2826
'steffi': Key('alt-ctrl-backspace'),
2927
'stippy': Key('alt-ctrl-delete'),
3028
'carmex': Key('alt-backspace'),
@@ -69,6 +67,3 @@
6967
}
7068

7169
ctx.keymap(keymap)
72-
73-
74-
def unload(): ctx.unload()

php.py

-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@
2020
}
2121

2222
ctx.keymap(keymap)
23-
24-
25-
def unload(): ctx.unload()

python.py

-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@
77
}
88

99
ctx.keymap(keymap)
10-
11-
12-
def unload(): ctx.unload()

slack.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
'channel': Key('cmd-k'),
77
'channel up': Key('alt-up'),
88
'channel down': Key('alt-down'),
9-
'highlight command': ['``', Key('left')],
10-
'highlight code': ['``````', Key('left left left')],
9+
'(highlight command | insert command)': ['``', Key('left')],
10+
'(highlight code | insert code)': ['``````', Key('left left left')],
1111
}
1212

1313
ctx.keymap(keymap)
14-
15-
16-
def unload(): ctx.unload()

spotify.py

-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,3 @@ def search_for(m):
3232
}
3333

3434
ctx.keymap(keymap)
35-
36-
37-
def unload(): ctx.unload()

std.py

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def word(m):
4444
words = [parse_word(word) for word in tmp]
4545
Str(' '.join(words))(None)
4646

47-
4847
def surround(by):
4948
def func(i, word, last):
5049
if i == 0:

switcher.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@
33

44
apps = {}
55

6+
67
def switch_app(m):
78
name = str(m._words[1])
89
full = apps.get(name)
9-
if not full: return
10+
if not full:
11+
return
1012
for app in ui.apps():
1113
if app.name == full:
1214
app.focus()
1315
break
1416

17+
1518
ctx = Context('switcher')
1619
keymap = {
1720
'focus {switcher.apps}': switch_app,
1821
}
1922
ctx.keymap(keymap)
2023

24+
2125
def update_lists():
2226
global apps
2327
new = {}
@@ -32,13 +36,11 @@ def update_lists():
3236
ctx.set_list('apps', new.keys())
3337
apps = new
3438

39+
3540
def ui_event(event, arg):
3641
if event in ('app_activate', 'app_deactivate', 'app_launch', 'app_close'):
3742
update_lists()
3843

44+
3945
ui.register('', ui_event)
4046
update_lists()
41-
42-
def unload():
43-
ctx.unload()
44-
ui.unregister('', update_lists)

symbol.py

-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,3 @@
5151
}
5252

5353
ctx.keymap(keymap)
54-
55-
56-
def unload(): ctx.unload()

terminal.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
'cd': 'cd ',
1010
'(ls | run ellis | run alice)': 'ls\n',
1111
'run make (durr | dear)': 'mkdir ',
12-
'[go] parent': 'cd ..\n',
12+
'[go] parent': 'cd ..; ls\n',
1313
'go back': 'cd -\n',
1414
'run jet': 'git ',
1515
'run jet clone': 'git clone ',
16+
'run jet checkout': 'git checkout ',
1617
'run jet diff': 'git diff ',
1718
'run jet commit': 'git commit ',
1819
'run jet push': 'git push ',
@@ -26,6 +27,3 @@
2627
}
2728

2829
ctx.keymap(keymap)
29-
30-
31-
def unload(): ctx.unload()

words.py

-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
}
1111

1212
ctx.keymap(keymap)
13-
14-
15-
def unload(): ctx.unload()

0 commit comments

Comments
 (0)