Skip to content

Commit

Permalink
added more commands for slack
Browse files Browse the repository at this point in the history
  • Loading branch information
TestPlan committed Aug 26, 2018
1 parent 94a84a0 commit ba7ffb5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
37 changes: 21 additions & 16 deletions slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
# Channel
'channel': Key('cmd-k'),
'channel last': Key('alt-up'),
'channel unread previous': Key('alt-shift-up'),
'[channel] unread last': Key('alt-shift-up'),
'channel next': Key('alt-down'),
'channel unread next': Key('alt-shift-down'),
'channel info': Key('cmd-shift-i'),

# Tools
'tools command': ['``', Key('left')],
'tools code': ['``````', Key('left left left return return up')],

'[channel] unread [next]': Key('alt-shift-down'),
'[channel] info': Key('cmd-shift-i'),

# Navigation
'move focus': Key('ctrl-`'),
'next section': Key('f6'),
Expand All @@ -25,28 +21,29 @@
'(open | collapse) right pane': Key('cmd-.'),
'direct messages': Key('cmd-shift-k'),
'threads': Key('cmd-shift-t'),
'history': Key('cmd-['),
'(back to the future | forward)': Key('cmd-]'),
'(history [next] | back | backward)': Key('cmd-['),
'(back to the future | ford | forward)': Key('cmd-]'),
'next element': Key('tab'),
'previous element': Key('shift-tab'),
'(my stuff | activity)': Key('cmd-shift-m'),
'directory': Key('cmd-shift-e'),
'starred items': Key('cmd-shift-s'),
'unread': Key('cmd-j'),
'(go | undo) full': Key('ctrl-cmd-f'),
'(starred [items] | stars)': Key('cmd-shift-s'),
'unread [messages]': Key('cmd-j'),
'(go | undo | toggle) full': Key('ctrl-cmd-f'),

# Messaging
'grab left': Key('shift-up'),
'grab right': Key('shift-down'),
'add line': Key('shift-enter'),
'slaw': [Key('cmd-right'), Key('shift-enter')],
'(slaw | slapper)': [Key('cmd-right'), Key('shift-enter')],
'(react | reaction)': Key('cmd-shift-\\'),
'user': Key('@'),
'tag channel': Key('#'),
'codify': Key('cmd-shift-c'),
'([insert] command | commandify)': Key('cmd-shift-c'),
'[insert] code': ['``````', Key('left left left'), Key('shift-enter'), Key('shift-enter'), Key('up')],
'(bullet | bulleted) list': Key('cmd-shift-8'),
'(number | numbered) list': Key('cmd-shift-7'),
'quotation': Key('cmd-shift->'),
'(quotes | quotation)': Key('cmd-shift->'),
'bold': Key('cmd-b'),
'(italic | italicize)': Key('cmd-i'),
'(strike | strikethrough)': Key('cmd-shift-x'),
Expand All @@ -62,6 +59,14 @@
'([toggle] mute | unmute)': Key('m'),
'([toggle] video)': Key('v'),
'invite': Key('a'),

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

# Miscellaneous
'shortcuts': Key('cmd-/'),
}

ctx.keymap(keymap)
2 changes: 1 addition & 1 deletion vs-code.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def jump_to_line(m):
press('cmd-left')

def jump_to_next_word_instance(m):
press('escape')
press('escape')
press('cmd-f')
Str(' '.join([str(s) for s in m.dgndictation[0]._words]))(None)
press('escape')
Expand Down

0 comments on commit ba7ffb5

Please sign in to comment.