-- Base for widgets local awmtk2 = require("awmtk2") local wibox = require("wibox") local gears = require("gears") local awful = require("awful") local beautiful = require("beautiful") return function(args) local style = awmtk2.create_style("taglist",awmtk2.default,args.style) local templates = awmtk2.create_template_lib("taglist",awmtk2.templates,args.templates) local t = awmtk2.build_templates(templates,style) local widget = wibox.widget(t.container(awful.widget.taglist({ screen = args.screen, filter = awful.widget.taglist.filter.all, style = { shape = style.button.shape }, layout = { spacing = style.base.spacing, spacing_widget = style.base.spacing_widget, layout = style.base.layout or wibox.layout.fixed.horizontal }, widget_template = t.button(t.article({ icon_id = "icon_role", title_id = "text_role" }),{ id = "background", create_callback = function(self, tag, index, tags) self:connect_signal("button::press",function(self,x,y,b) if b == 1 then awful.tag.viewmore({tag}) elseif b == 3 then awful.tag.viewtoggle(tag) end end) local bg = self:get_children_by_id("background")[1] if tag.selected then bg.bgimage = style.button.bgimage_focus bg.bg = style.button.bg_focus else bg.bgimage = style.button.bgimage_normal bg.bg = style.button.bg_normal end end, update_callback = function(self, tag, index, tags) local bg = self:get_children_by_id("background")[1] if tag.selected then bg.bgimage = style.button.bgimage_focus bg.bg = style.button.bg_focus else bg.bgimage = style.button.bgimage_normal bg.bg = style.button.bg_normal end end }) }))) return widget end