--- {{{ Statusbar
--- Create a taglist widget
-mytaglist = widget({ type = "taglist", name = "mytaglist" })
-mytaglist:mouse_add(mouse({}, 1, function (object, tag) awful.tag.viewonly(tag) end))
-mytaglist:mouse_add(mouse({ modkey }, 1, function (object, tag) awful.client.movetotag(tag) end))
-mytaglist:mouse_add(mouse({}, 3, function (object, tag) tag.selected = not tag.selected end))
-mytaglist:mouse_add(mouse({ modkey }, 3, function (object, tag) awful.client.toggletag(tag) end))
-mytaglist:mouse_add(mouse({ }, 4, awful.tag.viewnext))
-mytaglist:mouse_add(mouse({ }, 5, awful.tag.viewprev))
-function mytaglist.label(t)
- local text = ""
- if t.selected then
- text = "<bg color='"..bg_focus.."'/> <span color='"..fg_focus.."'>"..t.name.."</span> "
- else
- text = " "..t.name.." "
- end
- return text
-end
-
--- Create a tasklist widget
-mytasklist = widget({ type = "tasklist", name = "mytasklist" })
-mytasklist:mouse_add(mouse({ }, 1, function (object, c) c:focus_set(); c:raise() end))
-mytasklist:mouse_add(mouse({ }, 4, function () awful.client.focus(1) end))
-mytasklist:mouse_add(mouse({ }, 5, function () awful.client.focus(-1) end))
-function mytasklist.label(c)
- local text = ""
- if c.floating then
- text = "<bg image=\"" .. AWESOME_DATADIR .. "/icons/floatingw.png\" align=\"right\"/>"
- end
- if client.focus_get() == c then
- text = text .. " <bg color='"..bg_focus.."'/><span color='"..awful.escape(fg_focus).."'>"..c.name.."</span> "
- else
- text = text .. " "..awful.escape(c.name).." "
- end
- return text
-end
-