delta
f42a3a2cc9
add new icons, switch over to using stylesheets instead of gears.color.recolor_image, add a music widget to the panel, optimize services in common.lua, fix the application lense filtering and increase the update rate of services in common.lua Signed-off-by: delta <darkussdelta@gmail.com>
76 lines
2.3 KiB
Lua
76 lines
2.3 KiB
Lua
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
|
|
},
|
|
}
|
|
}
|