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

return function(args)
    local style = awmtk.style(awmtk.defaults, args.style or {},"wintitle_")
    local icon = style.icon({
        {
            widget = wibox.widget.textbox,
            markup = "<b></b>",
            id = "widget_text"
        },
        layout = wibox.layout.fixed.horizontal,
        spacing = style.wintitle_container_spacing_horizontal or 4
    })
    local text = icon:get_children_by_id("widget_text")[1]
    client.connect_signal("focus", function()
        text.markup = "<b>"..tostring(client.focus.icon_name).."</b>"
    end)
    return icon
end
