Better transparancy for top panel arrows

This commit is contained in:
Thomas Avé 2022-07-25 18:48:49 +02:00
parent 8b9e1eda07
commit 1e3cda014d
3 changed files with 19 additions and 16 deletions

View File

@ -9,20 +9,22 @@ local dpi = beautiful.xresources.apply_dpi
local function powerline(widget, bgcolor, adjacentcolor, right) local function powerline(widget, bgcolor, adjacentcolor, right)
right = right or false right = right or false
local container = { local arrow = right and lain.util.separators.arrow_right or lain.util.separators.arrow_left
layout = wibox.layout.fixed.horizontal, -- if (not right) then
wibox.layout.margin(widget, dpi(6), dpi(10)), -- table.insert(container, )
} -- else
if (not right) then -- table.insert(container, )
table.insert(container, lain.util.separators.arrow_left(bgcolor, adjacentcolor)) -- end
else
table.insert(container, lain.util.separators.arrow_right(bgcolor, adjacentcolor))
end
return wibox.widget{ return wibox.widget{
{ {
container, layout = wibox.layout.fixed.horizontal,
{
wibox.layout.margin(widget, dpi(6), dpi(10)),
bg = bgcolor, bg = bgcolor,
widget = wibox.container.background widget = wibox.container.background
},
arrow(bgcolor, adjacentcolor)
}, },
top = 0, bottom = 0, left = 0, right = 0, top = 0, bottom = 0, left = 0, right = 0,
widget = wibox.container.margin widget = wibox.container.margin

View File

@ -73,6 +73,7 @@ theme.tasklist_fg_normal = theme.fg_normal
-- Panel Sizing -- Panel Sizing
theme.top_panel_height = dpi(30) theme.top_panel_height = dpi(30)
theme.top_panel_powerline = "#002F5F" theme.top_panel_powerline = "#002F5F"
theme.top_panel_minimized = "#12151c"
-- Notification Sizing -- Notification Sizing
theme.notification_max_width = dpi(350) theme.notification_max_width = dpi(350)

View File

@ -86,12 +86,12 @@ local function list_update(w, buttons, label, data, objects)
ll:add(cbm) ll:add(cbm)
if (index % 2 == 0) then if (index % 2 == 0) then
local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.top_panel_powerline local end_color = (count == index or objects[index+1].minimized) and "" or theme.top_panel_powerline
local main_color = o.minimized and "#12151c" or theme.bg_normal local main_color = o.minimized and theme.top_panel_minimized or theme.bg_normal
bgb:set_widget(pl(ll, main_color, end_color, true)) bgb:set_widget(pl(ll, main_color, end_color, true))
else else
local end_color = (count == index or objects[index+1].minimized) and "#12151c" or theme.bg_normal local end_color = (count == index or objects[index+1].minimized) and "" or theme.bg_normal
local main_color = o.minimized and "#12151c" or theme.top_panel_powerline 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)) bgb:set_widget(pl(ll, main_color, end_color, true))
end end