Skip to content

Commit

Permalink
Created commands for finder an added BEM commands in std
Browse files Browse the repository at this point in the history
  • Loading branch information
TestPlan committed Aug 27, 2018
1 parent 3339bf3 commit 11451e8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 10 deletions.
60 changes: 60 additions & 0 deletions finder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from talon.voice import Key, Context

ctx = Context('Finder', bundle='com.apple.finder')
ctx.keymap({
'(dupe | duplicate)': Key('cmd-d'),
'trash it': Key('cmd-backspace'),

# jump to location
'all [my] files': Key('shift-cmd-f'),
'[my] computer': Key('shift-cmd-c'),
'documents': Key('shift-cmd-o'),
'desktop': Key('shift-cmd-d'),
'library': Key('shift-cmd-l'),
'network': Key('shift-cmd-k'),
'utilities': Key('shift-cmd-u'),
'downloads': Key('alt-cmd-l'),
'applications': Key('shift-cmd-a'),
'home': Key('shift-cmd-h'),
'iCloud': Key('shift-cmd-i'),
'airdrop': Key('shift-cmd-r'),

# views
'icon': Key('cmd-1'),
'list': Key('cmd-2'),
'column': Key('cmd-3'),
'cover': Key('cmd-4'),

# sorting / arranging files
'[(sort | arrange)] by none': Key('ctrl-cmd-0'),
'[(sort | arrange)] by name': Key('ctrl-cmd-1'),
'[(sort | arrange)] by kind': Key('ctrl-cmd-2'),
'[(sort | arrange)] by date last opened': Key('ctrl-cmd-3'),
'[(sort | arrange)] by date added': Key('ctrl-cmd-4'),
'[(sort | arrange)] by date modified': Key('ctrl-cmd-5'),
'[(sort | arrange)] by size': Key('ctrl-cmd-6'),
'[(sort | arrange)] by tags': Key('ctrl-cmd-7'),

# navigation
'parent folder': Key('cmd-up'),
'new window': Key('cmd-n'),
'new folder': Key('cmd-shift-n'),
'new tab': Key('cmd-t'),
'collapse': Key('cmd-left'),
'expand': Key('cmd-right'),
'open': Key('cmd-down'),
'(info | information)': Key('cmd-i'),


# other actions
'[toggle] preview': Key('shift-cmd-p'),
'eject': Key('cmd-e'),
'connect to server': Key('cmd-k'),
'[create] alias': Key('cmd-l'),
'close all': Key('alt-cmd-w'),
'add to dock': Key('ctrl-shift-cmd-t'),
'add to sidebar': Key('ctrl-cmd-t'),
'show package contents': Key('cmd-alt-o'),
# 'pathway': Key('cmd-alt-c'),
})

11 changes: 1 addition & 10 deletions std.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,7 @@ def FormatText(m):
'reverse': Key('tab'),
'advance': Key('`'),

# Finder
'documents': Key('shift-cmd-o'),
'desktop': Key('shift-cmd-d'),
'finder': Key('cmd-alt-space'),
'icon': Key('cmd-1'),
'list': Key('cmd-2'),
'column': Key('cmd-3'),
'cover': Key('cmd-4'),
'parent folder': Key('cmd-up'),
'open folder': Key('cmd-down'),
# 'pathway': Key('cmd-alt-c'),

# Zoom
'zoom in': Key('cmd-+'),
Expand Down Expand Up @@ -244,6 +234,7 @@ def FormatText(m):
'(downscore | score)': '_',
'(dubscore | double downscore | behm)': '__',
'(dubscore | double dash | behmdash)': '--',

'(semi | semicolon)': ';',
'colon': ':',
'(square | left square [bracket] | bracket)': '[', '(rsquare | are square | right square [bracket])': ']',
Expand Down

0 comments on commit 11451e8

Please sign in to comment.