local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")

require "screen.wibar.widgets"

function wibar_builder(s)
    local w = awful.wibar({
        screen = s,
        position = "top",
        bg = beautiful.bg_systray,
        height = 26,
    })

    local taglist = taglist(s)
    local tasklist = tasklist(s)
    local layoutbox = layoutbox(s)

    w:setup{
        expand = "none",
        layout = wibox.layout.align.horizontal,
        {
            layout = wibox.layout.fixed.horizontal,
            taglist,
        },
        tasklist,
        {
            layout = wibox.layout.fixed.horizontal,
            systray,
            keyboardlayout,
            clock,
            layoutbox,
        }
    }

    return w
end
