aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Golden <xdg@xdg.me>2019-01-25 17:28:10 -0500
committerTrygve Aaberge <trygveaa@gmail.com>2019-01-25 23:28:10 +0100
commit13d299a1276efac721d0009b4be1e5e557477430 (patch)
tree07a949ff47ce4906b025e257888f90472d49866e
parent5146b1f9166bb99344b923eef859d9bd7127737d (diff)
downloadwee-slack-13d299a1276efac721d0009b4be1e5e557477430.tar.gz
Add show_buflist_presence config option (#558)
This commit adds a `show_presence_presence` config option that defaults to true. When true, the `+` appears before present users in the buffer list, as they did before this commit. But when false, the `+` mark is omitted and presence is no longer shown. This helps users who want their terminal programs to flag activity but don't consider presence changes to be activity worth flagging.
-rw-r--r--wee_slack.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 66a1fc2..96932d3 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1838,10 +1838,9 @@ class SlackDMChannel(SlackChannel):
print_color = self.color
else:
print_color = ""
- if not present:
- prepend = " "
- else:
- prepend = "+"
+ prepend = ""
+ if config.show_buflist_presence:
+ prepend = "+" if present else " "
select = {
"default": self.slack_name,
"sidebar": prepend + self.slack_name,
@@ -4054,6 +4053,9 @@ class PluginConfig(object):
default='false',
desc='Use `foo.#channel` rather than `foo.slack.com.#channel` as the'
' internal name for Slack buffers. Overrides server_aliases.'),
+ 'show_buflist_presence': Setting(
+ default='true',
+ desc='Display a `+` character in the buffer list for present users.'),
'show_reaction_nicks': Setting(
default='false',
desc='Display the name of the reacting user(s) alongside each reactji.'),