From b72430b38402580f2288245cf25d28fdf88dfe8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 22 Jul 2022 16:04:18 +0200 Subject: [PATCH] Fix color when next item is minimized --- awesome/widgets/task-list.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/awesome/widgets/task-list.lua b/awesome/widgets/task-list.lua index 3cabe9d..f8e9d2f 100644 --- a/awesome/widgets/task-list.lua +++ b/awesome/widgets/task-list.lua @@ -92,13 +92,14 @@ local function list_update(w, buttons, label, data, objects) ll:add(l) ll:add(cbm) - if (index % 2 == 0) then - local end_color = count == index and "#12151c" or theme.top_panel_powerline - bg_clickable:set_widget(pl(ll, theme.bg_normal, end_color, true)) + local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.top_panel_powerline + local main_color = o.minimized and "#12151c" or theme.bg_normal + bg_clickable:set_widget(pl(ll, main_color, end_color, true)) else - local end_color = count == index and "#12151c" or theme.bg_normal - bg_clickable:set_widget(pl(ll, theme.top_panel_powerline, end_color, true)) + local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.bg_normal + local main_color = o.minimized and "#12151c" or theme.top_panel_powerline + bg_clickable:set_widget(pl(ll, main_color, end_color, true)) end -- And all of this gets a background bgb:set_widget(bg_clickable)