bar_items: Make the disconnect sign configurable.
This commit is contained in:
parent
14f4da0708
commit
e4377c6d1a
2 changed files with 15 additions and 10 deletions
|
@ -101,23 +101,17 @@ def matrix_bar_item_buffer_modes(data, item, window, buffer, extra_info):
|
||||||
modes = []
|
modes = []
|
||||||
|
|
||||||
if room.encrypted:
|
if room.encrypted:
|
||||||
modes.append(
|
modes.append(G.CONFIG.look.encrypted_room_sign)
|
||||||
G.CONFIG.look.encrypted_room_sign
|
|
||||||
)
|
|
||||||
|
|
||||||
if (server.client
|
if (server.client
|
||||||
and server.client.room_contains_unverified(room.room_id)):
|
and server.client.room_contains_unverified(room.room_id)):
|
||||||
modes.append(
|
modes.append(G.CONFIG.look.encryption_warning_sign)
|
||||||
G.CONFIG.look.encryption_warning_sign,
|
|
||||||
)
|
|
||||||
|
|
||||||
if not server.connected:
|
if not server.connected:
|
||||||
modes.append("❌")
|
modes.append(G.CONFIG.look.disconnect_sign)
|
||||||
|
|
||||||
if room_buffer.backlog_pending or server.busy:
|
if room_buffer.backlog_pending or server.busy:
|
||||||
modes.append(
|
modes.append(G.CONFIG.look.busy_sign)
|
||||||
G.CONFIG.look.busy_sign
|
|
||||||
)
|
|
||||||
|
|
||||||
return "".join(modes)
|
return "".join(modes)
|
||||||
|
|
||||||
|
|
|
@ -476,6 +476,17 @@ class MatrixConfig(WeechatConfig):
|
||||||
"(note: content is evaluated, see /help eval)"),
|
"(note: content is evaluated, see /help eval)"),
|
||||||
eval_cast,
|
eval_cast,
|
||||||
),
|
),
|
||||||
|
Option(
|
||||||
|
"disconnect_sign",
|
||||||
|
"string",
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
"❌",
|
||||||
|
("A sign that is used to show that the server is disconnected "
|
||||||
|
"(note: content is evaluated, see /help eval)"),
|
||||||
|
eval_cast,
|
||||||
|
),
|
||||||
Option(
|
Option(
|
||||||
"pygments_style",
|
"pygments_style",
|
||||||
"string",
|
"string",
|
||||||
|
|
Loading…
Add table
Reference in a new issue