Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

58 lines
2.2 KiB

-- 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