config: Add the lag_min_show option.

This commit is contained in:
Damir Jelić 2018-11-12 15:30:28 +01:00
parent a08400c975
commit 7e15b04f98
2 changed files with 10 additions and 1 deletions

View file

@ -74,7 +74,7 @@ def matrix_bar_item_lag(data, item, window, buffer, extra_info):
# pylint: disable=unused-argument
for server in SERVERS.values():
if buffer in server.buffers.values() or buffer == server.server_buffer:
if server.lag >= 500:
if server.lag >= G.CONFIG.network.lag_min_show:
color = W.color("irc.color.item_lag_counting")
if server.lag_done:
color = W.color("irc.color.item_lag_finished")

View file

@ -568,6 +568,15 @@ class MatrixConfig(WeechatConfig):
"their receival. If on, messages are immediately printed but "
"colored differently until receival is confirmed."),
),
Option(
"lag_min_show",
"integer",
"",
1,
604800,
"500",
("minimum lag to show (in milliseconds)"),
),
]
color_options = [