config: Add the lag_min_show option.
This commit is contained in:
parent
a08400c975
commit
7e15b04f98
2 changed files with 10 additions and 1 deletions
|
@ -74,7 +74,7 @@ def matrix_bar_item_lag(data, item, window, buffer, extra_info):
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
for server in SERVERS.values():
|
for server in SERVERS.values():
|
||||||
if buffer in server.buffers.values() or buffer == server.server_buffer:
|
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")
|
color = W.color("irc.color.item_lag_counting")
|
||||||
if server.lag_done:
|
if server.lag_done:
|
||||||
color = W.color("irc.color.item_lag_finished")
|
color = W.color("irc.color.item_lag_finished")
|
||||||
|
|
|
@ -568,6 +568,15 @@ class MatrixConfig(WeechatConfig):
|
||||||
"their receival. If on, messages are immediately printed but "
|
"their receival. If on, messages are immediately printed but "
|
||||||
"colored differently until receival is confirmed."),
|
"colored differently until receival is confirmed."),
|
||||||
),
|
),
|
||||||
|
Option(
|
||||||
|
"lag_min_show",
|
||||||
|
"integer",
|
||||||
|
"",
|
||||||
|
1,
|
||||||
|
604800,
|
||||||
|
"500",
|
||||||
|
("minimum lag to show (in milliseconds)"),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
color_options = [
|
color_options = [
|
||||||
|
|
Loading…
Reference in a new issue