diff options
author | jason <jason@zzq.org> | 2017-11-08 14:51:21 -0700 |
---|---|---|
committer | jason <jason@zzq.org> | 2017-11-08 14:58:32 -0700 |
commit | 11d4fc4961fd625f734930742aabc81c514d1acc (patch) | |
tree | 256332b4a5c8deea862c36f72204e947597ac0f1 /wee_slack.py | |
parent | 49211f9741a31a44a1bceff0c57ae0286f7a5aa7 (diff) | |
download | wee-slack-11d4fc4961fd625f734930742aabc81c514d1acc.tar.gz |
Add option to disable sending typing notification to Slack
- Many IM clients that support alerting the receiving user that you're
typing include an option to disable this behavior. This commit adds
the `send_typing_notice` boolean option. When it is false
`typing_notification_cb` is not registered for the
`input_text_changed` Weechat signal. By default this option is
true.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 274e05e..093767a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3332,7 +3332,8 @@ def setup_hooks(): w.hook_signal('buffer_switch', "buffer_switch_callback", "EVENTROUTER") w.hook_signal('window_switch', "buffer_switch_callback", "EVENTROUTER") w.hook_signal('quit', "quit_notification_cb", "") - w.hook_signal('input_text_changed', "typing_notification_cb", "") + if config.send_typing_notice: + w.hook_signal('input_text_changed', "typing_notification_cb", "") w.hook_command( # Command name and description @@ -3455,6 +3456,10 @@ class PluginConfig(object): default='italic', desc='When receiving bold text from Slack, render it as this in weechat.' ' If your terminal lacks italic support, consider using "underline" instead.'), + 'send_typing_notice': Setting( + default='true', + desc='Alert Slack users when you are typing a message in the input bar ' + '(Requires reload)'), 'server_aliases': Setting( default='', desc='A comma separated list of `subdomain:alias` pairs. The alias' |