Bah, replied to Uli directly instead of the list. I'll try again :P
Excellent, I got it to work, thank you. I had to change filter to label tho.
2 follow up questions if I may. The following code works for displaying the
numbers, but for some reason the icon and hover color is lost.
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(
function(c)
-- Peter: Enumerate tasks
local entries = {}
for _, c in ipairs(client.get(s)) do
if awful.widget.tasklist.label.currenttags(c, s) then
table.insert(entries, c)
end
end
if awful.widget.tasklist.label.currenttags(c, s) then
return awful.util.table.hasitem(entries, c).."
"..awful.widget.tasklist.label.currenttags(c, s)
end
end,
mytasklist.buttons)
Any ideas?
Also, I'm trying to get the code to work for selecting the tasks using the
mod plus number. I'm pretty sure I'm on the right track by replacing the
code for selecting workspaces, but I keep getting the error: attempt to
index local 'c' (a nil value).
-- Bind all key numbers to tasks.
for i = 1, 9 do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function (c)
local entries = {}
for _, c in ipairs(client.get(c.screen)) do
if awful.widget.tasklist.label.currenttags(c,
c.screen) then
table.insert(entries,
c)
end
end
if awful.util.table.hasitem(entries, c) and i ==
awful.util.table.hasitem(entries, c) then
awful.client.jumpto(c, false)
end
end))
end
Am I going about that the wrong way?