Skip to content

Commit

Permalink
created shortcuts for spectacle, pocket, and bitbucket. edited slack,…
Browse files Browse the repository at this point in the history
… spotify, std, jetbrains, and phpstorm
  • Loading branch information
TestPlan committed Aug 30, 2018
1 parent 11451e8 commit 5258015
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 11 deletions.
57 changes: 57 additions & 0 deletions bit-bucket.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from talon.voice import Context, Key

ctx = Context('bit-bucket', func=lambda app, win: 'Bitbucket' in win.title)

keymap = {
# All Pages

'shortcuts': Key('?'),
'left navigation': Key('['),
'site search': Key('/'),

# Most Pages (except your work and repository source)
'omnibar': Key('.'),
'next item': Key('capslock-j'),
'last item': Key('capslock-k'),
'selected': Key('capslock-o'),
'[work] dashboard': Key('capslock-g capslock-d'),
'[bucket] settings': Key('capslock-g capslock-a'),
'remove focus': Key('esc'),
'go back': Key('capslock-u'),
'right navigation': Key(']'),

# Repository source
'focus': Key('capslock-f'),

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

# Repository pages (except source and settings)
'fork repository': Key('capslock-x capslock-f'),
'create branch': Key('capslock-x capslock-b'),
'compare': Key('capslock-x capslock-c'),
'fork repository': Key('capslock-x capslock-f'),
'create pull request': Key('capslock-x capslock-p'),
'create issue': Key('capslock-x capslock-i'),

# Pull Requests
'submit comment': Key('ctrl+enter'),
'inline comments': Key('capslock-t capslock-c'),
'diff tab': Key('capslock-p capslock-d'),
'commits tab': Key('capslock-p capslock-c'),
'activity tab': Key('capslock-p capslock-a'),
'show tasks': Key('shift-capslock-t'),

}

ctx.keymap(keymap)
7 changes: 7 additions & 0 deletions google-chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def jump_tab(m):
'search': search,
'print': print_page,
'top': scroll_to_top,
'clear': [Key('cmd-a'), Key('backspace')],

# youtube
# disable vimium for youtube shortcuts to work
Expand Down Expand Up @@ -166,12 +167,15 @@ def jump_tab(m):
'find': Key('cmd-f'),
'next match': Key('cmd-g'),
'(last | prevous)': Key('cmd-shift-g'),
'(pushpin | pullpin)': Key('cmd-shift-x'),

'clear cash': Key('cmd-shift-backspace'),

# dev tools
'toggle dev tools': Key('cmd-alt-i'),
'command [menu]': Key('cmd-shift-p'),
'element': Key('cmd-shift-c'),
'mobile': Key('cmd-shift-m'),
'(javascript (counsel | console) | javascript (counsel | console) close)': Key('cmd-alt-j'),
'next panel': next_panel,
'(last | prevous) panel': last_panel,
Expand All @@ -190,4 +194,7 @@ def jump_tab(m):

# Clipboard
'paste same style': Key('cmd-alt-shift-v'),



})
8 changes: 5 additions & 3 deletions jetbrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
]


ctx = Context('phpstorm', func=lambda app, win: any(
ctx = Context('jetbrains', func=lambda app, win: any(
i in app.bundle for i in ides))

keymap = {
'clear': [Key('cmd-a'), Key('backspace')],
'comment declaration': ['/**', Key('space')],
'comment block': ['/**', Key('enter')],
'block comment': Key('cmd-alt-/'),
Expand Down Expand Up @@ -50,7 +51,8 @@
'grab down': Key('shift-cmd-pagedown'),
# 'rename': Key('shift-f6'),
'move file': Key('f6'),
'global search': Key('shift shift'),
'file search': Key('shift shift'),
'global search': Key('cmd-shift-f'),
'go to file': Key('cmd-shift-n'),
'format': Key('cmd-alt-l'),
'expand': Key('cmd-+'),
Expand All @@ -62,7 +64,7 @@
'snip right': Key('cmd-shift-right delete'),
'move up': Key('alt-shift-up'),
'move down': Key('alt-shift-down'),
'path': Key('cmd-shift-f'),
'path': Key('cmd-shift-f'),
'funk up': Key('cmd-shift-up'),
'funk down': Key('cmd-shift-down'),
'(breadcrumbs | crumbs)': Key('cmd-up'),
Expand Down
3 changes: 2 additions & 1 deletion php-storm.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
'else markup': ['elsem', Key('tab')],
'complete': Key('cmd-shift-enter'),
'definition': Key('alt-space'),
}

}


ctx.keymap(keymap)
Expand Down
40 changes: 40 additions & 0 deletions pocket.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from talon.voice import Context, Key

ctx = Context('pocket', bundle='com.readitlater.PocketMac')

keymap = {
# File Menu
'save keyboard': Key('cmd-s'),
'refresh': Key('cmd-r'),
'close window': Key('cmd-w'),
'print': Key('cmd-p'),

# Edit Menu
'tags': Key('t'),
'save tag': Key('cmd-enter'),
'undo': Key('cmd-z'),
'redo': Key('shift-cmd-z'),

# View Menu
'next': Key('j'),
'previous': Key('k'),
'list home': Key('cmd-1'),
'list favorites': Key('cmd-2'),
'list archive': Key('cmd-3'),
'filter all items': Key('alt-1'),
'filter articles': Key('alt-2'),
'filter videos': Key('alt-3'),
'filter images': Key('alt-4'),
'(web | article) view': Key('cmd-/'),

# Item Menu
'archive': Key('a'),
'favorite': Key('f'),
'delete': Key('backspace'),
'copy item': Key('c'),
'mail item': Key('shift-cmd-i'),
'open in browser': Key('o'),
'open in background': Key('cmd-o'),
}

ctx.keymap(keymap)
3 changes: 2 additions & 1 deletion slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@

# Calls
'([toggle] mute | unmute)': Key('m'),
'([toggle] video)': Key('v'),
'[toggle] video': Key('v'),
'invite': Key('a'),

# Emojis
'thumbs up': ':+1:',
'smiley': ':slightly_smiling_face:',
'laugh out loud': ':joy:',
'shruggie': '/shrug ',

# Miscellaneous
'shortcuts': Key('cmd-/'),
Expand Down
28 changes: 28 additions & 0 deletions spectacle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from talon.voice import Context, Key

ctx = Context('spectacle')

keymap = {

'center': Key('alt-cmd-c'),
'(fullscreen | full)': Key('cmd-alt-f'),
'snapleft': Key('cmd-alt-left'),
'snapright': Key('cmd-alt-right'),
'snap up': Key('alt-cmd-up'),
'snap down': Key('alt-cmd-down'),
'snap top left': Key('ctrl-cmd-left'),
'snap bottom left': Key('ctrl-shift-cmd-left'),
'snap top right': Key('ctrl-cmd-right'),
'snap bottom right': Key('ctrl-shift-cmd-right'),
'next display': Key('ctrl-alt-cmd-right'),
'previous display': Key('ctrl-alt-cmd-left'),
'next third': Key('ctrl-alt-right'),
'previous third': Key('ctrl-alt-left'),
'make larger': Key('ctrl-alt-shift-right'),
'make smaller': Key('ctrl-alt-shift-left'),
'speck undo': Key('alt-cmd-z'),
'speck redo': Key('alt-shift-cmd-z'),

}

ctx.keymap(keymap)
2 changes: 1 addition & 1 deletion spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}


ctx = Context('phpstorm', func=lambda app, win: any(
ctx = Context('spotify', func=lambda app, win: any(
i in app.bundle for i in ides))

keymap = {
Expand Down
28 changes: 23 additions & 5 deletions std.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,26 @@ def FormatText(m):
'kill': Key('ctrl-c'),

# Spectacle
'(fullscreen | full)': Key('cmd-alt-f'),
'snapleft': Key('cmd-alt-left'),
'snapright': Key('cmd-alt-right'),

# '(fullscreen | full)': Key('cmd-alt-f'),
# 'snapleft': Key('cmd-alt-left'),
# 'snapright': Key('cmd-alt-right'),
# 'center': Key('alt-cmd-c'),
# # 'left half': Key('alt-cmd-left'),
# # 'right half': Key('alt-cmd-right'),
# 'tippy half': Key('alt-cmd-up'),
# 'flippy half': Key('alt-cmd-down'),
# 'upper left': Key('ctrl-cmd-left'),
# 'lower left': Key('ctrl-shift-cmd-left'),
# 'upper right': Key('ctrl-cmd-right'),
# 'lower right': Key('ctrl-shift-cmd-right'),
# 'next display': Key('ctrl-alt-cmd-right'),
# 'previous left': Key('ctrl-alt-cmd-left'),
# 'next third': Key('ctrl-alt-right'),
# 'previous third': Key('ctrl-alt-left'),
# 'make larger': Key('ctrl-alt-shift-right'),
# 'make smaller': Key('ctrl-alt-shift-left'),
# 'spec undo': Key('alt-cmd-z'),
# 'spec redo': Key('alt-shift-cmd-z'),

'spotlight': Key('cmd-space'),

Expand Down Expand Up @@ -320,10 +336,12 @@ def FormatText(m):
'tip double': 'double ',

'args': ['()', Key('left')],
'index': ['[]', Key('left')],
'brackets': ['[]', Key('left')],
'block': [' {}', Key('left enter enter up tab')],
'empty array': '[]',
'empty dict | braces': '{}',
# 'brace': [' else if ()', Key('left')],


# python
'state (def | deaf | deft)': 'def ',
Expand Down

0 comments on commit 5258015

Please sign in to comment.