forked from pimentel/talon_user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spectacle.py
36 lines (24 loc) · 974 Bytes
/
spectacle.py
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
from talon.voice import Key, press, Str, Context
# Move and resize windows with Spectacle.app
ctx = Context('spectacle')
keymap = {
'windy center': Key('cmd-alt-f'),
'windy max': Key('cmd-alt-f'),
'windy left': Key('cmd-alt-left'),
'windy right': Key('cmd-alt-right'),
'windy up': Key('cmd-alt-up'),
'windy down': Key('cmd-alt-down'),
'windy upper left': Key('cmd-ctrl-left'),
'windy lower left': Key('cmd-ctrl-shift-left'),
'windy upper right': Key('cmd-ctrl-right'),
'windy lower right': Key('cmd-ctrl-shift-right'),
'windy next display': Key('cmd-ctrl-alt-right'),
'windy previous display': Key('cmd-ctrl-alt-left'),
'windy next third': Key('ctrl-alt-right'),
'windy previous third': Key('ctrl-alt-left'),
'windy larger': Key('shift-ctrl-alt-right'),
'windy smaller': Key('shift-ctrl-alt-left'),
'windy undo': Key('cmd-alt-z'),
'windy redo': Key('cmd-alt-shift-z'),
}
ctx.keymap(keymap)