From 14f4da0708920c96e3a7b6a30842c68dccf61626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 14 Nov 2018 22:05:56 +0100 Subject: [PATCH] bar_items: Make the encrypted room sign configurable. --- matrix/bar_items.py | 4 +++- matrix/config.py | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/matrix/bar_items.py b/matrix/bar_items.py index 150540b..7260891 100644 --- a/matrix/bar_items.py +++ b/matrix/bar_items.py @@ -101,7 +101,9 @@ def matrix_bar_item_buffer_modes(data, item, window, buffer, extra_info): modes = [] if room.encrypted: - modes.append("🔐") + modes.append( + G.CONFIG.look.encrypted_room_sign + ) if (server.client and server.client.room_contains_unverified(room.room_id)): diff --git a/matrix/config.py b/matrix/config.py index 0764ea4..1dd2c4b 100644 --- a/matrix/config.py +++ b/matrix/config.py @@ -464,6 +464,18 @@ class MatrixConfig(WeechatConfig): " (note: content is evaluated, see /help eval)"), eval_cast, ), + Option( + "encrypted_room_sign", + "string", + "", + 0, + 0, + "🔐", + ("A sign that is used to show that the current room is " + "encrypted " + "(note: content is evaluated, see /help eval)"), + eval_cast, + ), Option( "pygments_style", "string",