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 = []
|
||||
|
||||
if room.encrypted:
|
||||
modes.append(
|
||||
G.CONFIG.look.encrypted_room_sign
|
||||
)
|
||||
modes.append(G.CONFIG.look.encrypted_room_sign)
|
||||
|
||||
if (server.client
|
||||
and server.client.room_contains_unverified(room.room_id)):
|
||||
modes.append(
|
||||
G.CONFIG.look.encryption_warning_sign,
|
||||
)
|
||||
modes.append(G.CONFIG.look.encryption_warning_sign)
|
||||
|
||||
if not server.connected:
|
||||
modes.append("❌")
|
||||
modes.append(G.CONFIG.look.disconnect_sign)
|
||||
|
||||
if room_buffer.backlog_pending or server.busy:
|
||||
modes.append(
|
||||
G.CONFIG.look.busy_sign
|
||||
)
|
||||
modes.append(G.CONFIG.look.busy_sign)
|
||||
|
||||
return "".join(modes)
|
||||
|
||||
|
|
|
@ -476,6 +476,17 @@ class MatrixConfig(WeechatConfig):
|
|||
"(note: content is evaluated, see /help eval)"),
|
||||
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(
|
||||
"pygments_style",
|
||||
"string",
|
||||
|
|
Loading…
Add table
Reference in a new issue