From 11451e878d1b9c8aef82315bb20f22352938f590 Mon Sep 17 00:00:00 2001 From: Ian Markind Date: Mon, 27 Aug 2018 04:33:18 -0400 Subject: [PATCH] Created commands for finder an added BEM commands in std --- finder.py | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ std.py | 11 +--------- 2 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 finder.py diff --git a/finder.py b/finder.py new file mode 100644 index 0000000..86c3d73 --- /dev/null +++ b/finder.py @@ -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'), + }) + diff --git a/std.py b/std.py index 487fa90..a32b03a 100644 --- a/std.py +++ b/std.py @@ -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-+'), @@ -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])': ']',