35 lines
1.0 KiB
Lua
35 lines
1.0 KiB
Lua
local lain = require("lain")
|
|
local wibox = require("wibox")
|
|
local beautiful = require("beautiful")
|
|
local dpi = beautiful.xresources.apply_dpi
|
|
|
|
-- ===================================================================
|
|
-- Helper functions
|
|
-- ===================================================================
|
|
|
|
local function powerline(widget, bgcolor, adjacentcolor, right)
|
|
right = right or false
|
|
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{
|
|
{
|
|
layout = wibox.layout.fixed.horizontal,
|
|
{
|
|
wibox.container.margin(widget, dpi(6), dpi(10), dpi(0), dpi(1)),
|
|
bg = bgcolor,
|
|
widget = wibox.container.background
|
|
|
|
},
|
|
arrow(bgcolor, adjacentcolor)
|
|
},
|
|
top = 0, bottom = 0, left = 0, right = 0,
|
|
widget = wibox.container.margin
|
|
}
|
|
end
|
|
|
|
return powerline
|