Skip to content

Commit

Permalink
tweaked bit bucket and android messages. added go to path function in…
Browse files Browse the repository at this point in the history
… finder
  • Loading branch information
TestPlan committed Sep 11, 2018
1 parent c319e3b commit b7155c0
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_store
.DS_store
.idea/
4 changes: 3 additions & 1 deletion android-messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

keymap = {

'new conversation': Key('cmd-alt-c'),
# Collides with spectacle
'new': Key('cmd-alt-c'),

'next conversation': Key('ctrl-.'),
'previous conversation': Key('ctrl-,'),
'delete conversation': Key('cmd-alt-r'),
Expand Down
11 changes: 5 additions & 6 deletions bit-bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

keymap = {
# All Pages

'shortcuts': Key('?'),
'left navigation': Key('['),
'site search': Key('/'),
Expand All @@ -14,8 +13,8 @@
'next item': Key('j'),
'last item': Key('k'),
'selected': Key('o'),
'[work] dashboard': Key('g d'),
'[bucket] settings': Key('g a'),
'dashboard': Key('g d'),
'settings': Key('g a'),
'remove focus': Key('esc'),
'go back': Key('u'),
'right navigation': Key(']'),
Expand All @@ -25,19 +24,19 @@

# Repository pages (except source)
'create': Key('c r'),
'import': Key('I r'),
'import': Key('i r'),
'source': Key('r s'),
'view commits': Key('r c'),
'view branches': Key('r b'),
'pull requests': Key('r p'),
'issues': Key('r i'),
'wiki': Key('r w'),
'show downloads': Key('r d'),
'downloads': Key('r d'),
'repo settings': Key('r a'),
'find file': Key('f'),

# Repository pages (except source and settings)
'fork repository': Key('x f'),
'fork': Key('x f'),
'create branch': Key('x b'),
'compare': Key('x c'),
'create pull request': Key('x p'),
Expand Down
26 changes: 22 additions & 4 deletions finder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
from talon.voice import Key, Context
from talon.voice import Key, Context, Str, press


ctx = Context('Finder', bundle='com.apple.finder')


def go_to_path(path):
def path_function(m):
press('cmd-shift-g')
Str(path)(None)
press('return')
return path_function


ctx.keymap({
'(dupe | duplicate)': Key('cmd-d'),
'trash it': Key('cmd-backspace'),
Expand All @@ -18,6 +29,15 @@
'home': Key('shift-cmd-h'),
'iCloud': Key('shift-cmd-i'),
'airdrop': Key('shift-cmd-r'),
'talon': go_to_path('~/.talon/user'),
'code': go_to_path('~/code'),
'pictures': go_to_path('~/Pictures'),
'music': go_to_path('~/Music'),
'movies': go_to_path('~/Movies'),
'dropbox': go_to_path('~/Dropbox'),
'books': go_to_path('~/Books'),
'local sites': go_to_path('~/Local Sites'),
'next level': go_to_path('~/Documents/Client Work/Next Level'),

# views
'icon': Key('cmd-1'),
Expand Down Expand Up @@ -45,7 +65,6 @@
'open': Key('cmd-down'),
'(info | information)': Key('cmd-i'),


# other actions
'[toggle] preview': Key('shift-cmd-p'),
'eject': Key('cmd-e'),
Expand All @@ -56,5 +75,4 @@
'add to sidebar': Key('ctrl-cmd-t'),
'show package contents': Key('cmd-alt-o'),
# 'pathway': Key('cmd-alt-c'),
})

})
1 change: 1 addition & 0 deletions google-chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def focus_address_bar(m):

def search(m):
press('cmd-m')
press('cmd-shift-.')


def scroll_to_top(m):
Expand Down
3 changes: 3 additions & 0 deletions slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
'directory': Key('cmd-shift-e'),
'(starred [items] | stars)': Key('cmd-shift-s'),
'unread [messages]': Key('cmd-j'),
'top': Key('cmd-up'),
'bottom': Key('cmd-down'),
'(go | undo | toggle) full': Key('ctrl-cmd-f'),


# Messaging
'grab left': Key('shift-up'),
'grab right': Key('shift-down'),
Expand Down
Loading

0 comments on commit b7155c0

Please sign in to comment.