From 1e3cda014d954bea196ae9fcb229d9a37a71df47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 25 Jul 2022 18:48:49 +0200 Subject: [PATCH] Better transparancy for top panel arrows --- awesome/powerline.lua | 26 ++++++++++++++------------ awesome/theme.lua | 1 + awesome/widgets/task-list.lua | 8 ++++---- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/awesome/powerline.lua b/awesome/powerline.lua index 5f446cc..9a7bda6 100644 --- a/awesome/powerline.lua +++ b/awesome/powerline.lua @@ -9,20 +9,22 @@ local dpi = beautiful.xresources.apply_dpi local function powerline(widget, bgcolor, adjacentcolor, right) right = right or false - local container = { - layout = wibox.layout.fixed.horizontal, - wibox.layout.margin(widget, dpi(6), dpi(10)), - } - if (not right) then - table.insert(container, lain.util.separators.arrow_left(bgcolor, adjacentcolor)) - else - table.insert(container, lain.util.separators.arrow_right(bgcolor, adjacentcolor)) - end + local arrow = right and lain.util.separators.arrow_right or lain.util.separators.arrow_left + -- if (not right) then + -- table.insert(container, ) + -- else + -- table.insert(container, ) + -- end return wibox.widget{ { - container, - bg = bgcolor, - widget = wibox.container.background + layout = wibox.layout.fixed.horizontal, + { + wibox.layout.margin(widget, dpi(6), dpi(10)), + bg = bgcolor, + widget = wibox.container.background + + }, + arrow(bgcolor, adjacentcolor) }, top = 0, bottom = 0, left = 0, right = 0, widget = wibox.container.margin diff --git a/awesome/theme.lua b/awesome/theme.lua index eddf645..6d45672 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -73,6 +73,7 @@ theme.tasklist_fg_normal = theme.fg_normal -- Panel Sizing theme.top_panel_height = dpi(30) theme.top_panel_powerline = "#002F5F" +theme.top_panel_minimized = "#12151c" -- Notification Sizing theme.notification_max_width = dpi(350) diff --git a/awesome/widgets/task-list.lua b/awesome/widgets/task-list.lua index b36efbc..54ebe8e 100644 --- a/awesome/widgets/task-list.lua +++ b/awesome/widgets/task-list.lua @@ -86,12 +86,12 @@ local function list_update(w, buttons, label, data, objects) ll:add(cbm) if (index % 2 == 0) then - 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 + local end_color = (count == index or objects[index+1].minimized) and "" or theme.top_panel_powerline + local main_color = o.minimized and theme.top_panel_minimized or theme.bg_normal bgb:set_widget(pl(ll, main_color, end_color, true)) else - 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 + local end_color = (count == index or objects[index+1].minimized) and "" or theme.bg_normal + local main_color = o.minimized and theme.top_panel_minimized or theme.top_panel_powerline bgb:set_widget(pl(ll, main_color, end_color, true)) end