aboutsummaryrefslogtreecommitdiff
path: root/plugins/degesch/fancy-prompt.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/degesch/fancy-prompt.lua')
-rw-r--r--plugins/degesch/fancy-prompt.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/degesch/fancy-prompt.lua b/plugins/degesch/fancy-prompt.lua
index c0611f3..1c3bb32 100644
--- a/plugins/degesch/fancy-prompt.lua
+++ b/plugins/degesch/fancy-prompt.lua
@@ -34,6 +34,7 @@ local prompt = degesch.hook_prompt (function (hook)
local chan = current.channel
local s = current.server
+ local bg_color = "255"
local current_n = 0
local active = ""
for i, buffer in ipairs (degesch.buffers) do
@@ -41,7 +42,10 @@ local prompt = degesch.hook_prompt (function (hook)
current_n = i
elseif buffer.new_messages_count ~= buffer.new_unimportant_count then
if active ~= "" then active = active .. "," end
- if buffer.highlighted then active = active .. "!" end
+ if buffer.highlighted then
+ active = active .. "!"
+ bg_color = "224"
+ end
active = active .. i
end
end
@@ -65,8 +69,8 @@ local prompt = degesch.hook_prompt (function (hook)
-- Note that this doesn't count with full-width or zero-width characters.
local overflow = utf8.offset (x, cols - 1)
if overflow then x = x:sub (1, overflow) end
- x = "\x01\x1b[0;4;1;38;5;16m\x1b[48;5;255m\x02" ..
- x .. "\x01\x1b[0;4;1;7;38;5;255m\x02 \x01\x1b[0;1m\x02"
+ x = "\x01\x1b[0;4;1;38;5;16m\x1b[48;5;" .. bg_color .. "m\x02" ..
+ x .. "\x01\x1b[0;4;1;7;38;5;" .. bg_color .. "m\x02 \x01\x1b[0;1m\x02"
local user_prefix = function (chan, user)
for i, chan_user in ipairs (chan.users) do