local awful = require "awful" local gcolor = require "gears.color" local gdebug = require "gears.debug" local phosphor = require "assets.phosphor" local qbind = require "quarrel.bind" local qui = require "quarrel.ui" local qvars = require "quarrel.vars" local wibox = require "wibox" return awful.widget.taglist { screen = screen[1], filter = awful.widget.taglist.filter.all, layout = { spacing = qvars.padding, layout = wibox.layout.fixed.vertical }, widget_template = { widget = wibox.container.place, valign = "center", halign = "center", create_callback = function(self, tag) self.widget = qui.icon(tag.icon) self:connect_signal("mouse::enter", function() if tag.selected then return end self.widget.stylesheet = qui.recolor(qvars.colors.yellow) end) self:connect_signal("mouse::leave", function() if tag.selected then return end self.widget.stylesheet = qui.recolor(qvars.colors.fg) end) if tag.selected then self.widget.stylesheet = qui.recolor(qvars.colors.yellow) return end self.widget.stylesheet = qui.recolor(qvars.colors.fg) end, update_callback = function(self, tag) -- self.widget.icon = phosphor[next(tag:clients()) and "circle_fill" or "circle_bold"] if tag.selected then self.widget.stylesheet = qui.recolor(qvars.colors.yellow) else self.widget.stylesheet = qui.recolor(qvars.colors.fg) end end }, buttons = { qbind:new { triggers = qvars.btns.left, press = function(t) t:view_only() end, hidden = true }, qbind:new { mods = qvars.mods.M, triggers = qvars.btns.left, press = function(t) if client.focus then client.focus:move_to_tag(t) end end, hidden = true }, qbind:new { triggers = qvars.btns.right, press = awful.tag.viewtoggle, hidden = true }, } }