From 8fa453411b7e0772ba69a4144a10cf536889b0e4 Mon Sep 17 00:00:00 2001 From: Chris Antos Date: Thu, 16 Jan 2025 03:26:31 -0800 Subject: [PATCH] Fix #76; battery module: incorrect use of .bg --- flexprompt_modules.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flexprompt_modules.lua b/flexprompt_modules.lua index adb4295..c08767e 100644 --- a/flexprompt_modules.lua +++ b/flexprompt_modules.lua @@ -491,7 +491,8 @@ local function render_battery(args) -- The "22;" defeats the color parsing that would normally generate -- corresponding fg and bg colors even though only an explicit bg color -- was provided (versus a usual {fg=x,bg=y} color table). - color = "22;" .. color.bg .. ";30" + local c = flexprompt.lookup_color(color) + color = "22;" .. c.bg .. ";30" end local segments = {}