-
-
Save kronolynx/66ec8a3b1b333b3be0826b609dee535f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create a taglist widget | |
s.mytaglist = | |
awful.widget.taglist { | |
screen = s, | |
filter = function(t) | |
return t.selected or #t:clients() > 0 | |
end, | |
buttons = awful.util.taglist_buttons, | |
layout = { | |
spacing = -12, | |
spacing_widget = { | |
color = beautiful.bg_normal, | |
shape = gears.shape.parallelogram, | |
widget = wibox.widget.separator | |
}, | |
layout = wibox.layout.fixed.horizontal | |
}, | |
widget_template = { | |
{ | |
{ | |
{ | |
{ | |
{ | |
id = "text_role", | |
widget = wibox.widget.textbox | |
}, | |
layout = wibox.layout.fixed.horizontal | |
}, | |
left = 2, | |
right = 2, | |
widget = wibox.container.margin | |
}, | |
id = "background_role", | |
widget = wibox.container.background | |
}, | |
bottom = 2, | |
color = beautiful.bg_normal, | |
widget = wibox.container.margin, | |
id = "current_tag" | |
}, | |
left = 3, | |
right = 3, | |
layout = wibox.container.margin, | |
create_callback = function(self, t, index, objects) | |
local col = t.selected and beautiful.border_focus or beautiful.bg_normal | |
local current_tag = self:get_children_by_id("current_tag")[1] | |
current_tag.color = col | |
t:connect_signal("property::urgent", function() | |
current_tag.color = beautiful.fg_urgent | |
end | |
) | |
end, | |
update_callback = function(self, t, index, objects) | |
local col = t.selected and beautiful.border_focus or beautiful.bg_normal | |
self:get_children_by_id("current_tag")[1].color = col | |
end | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment