From 4e081e7c2a8650c0fd9b9acd404d7466f363b794 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 29 Jul 2008 11:23:52 +0200 Subject: [PATCH] awful: move taglist label in label.all Signed-off-by: Julien Danjou --- awesomerc.lua.in | 2 +- lib/awful.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 18322d51..508bd229 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -84,7 +84,7 @@ mytaglist:mouse_add(mouse({}, 3, function (object, tag) tag.selected = not tag.s 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) return awful.widget.taglist.label(t, bg_focus, fg_focus) end +function mytaglist.label(t) return awful.widget.taglist.label.all(t, bg_focus, fg_focus) end -- Create a tasklist widget mytasklist = widget({ type = "tasklist", name = "mytasklist" }) diff --git a/lib/awful.lua b/lib/awful.lua index ce997fd9..29e2b4f2 100644 --- a/lib/awful.lua +++ b/lib/awful.lua @@ -45,6 +45,7 @@ P.client = {} P.tag = {} P.widget = {} P.widget.taglist = {} +P.widget.taglist.label = {} P.widget.tasklist = {} P.widget.tasklist.label = {} @@ -758,14 +759,14 @@ function P.unescape(text) return text end ---- Return labels for a taglist widget. +--- Return labels for a taglist widget with all tag from screen. -- It returns the tag name and set a special -- foreground and background color for selected tags. -- @param t The tag. -- @param bg_focus The background color for selected tag. -- @param fg_focus The foreground color for selected tag. -- @return A string to print. -function P.widget.taglist.label(t, bg_focus, fg_focus) +function P.widget.taglist.label.all(t, bg_focus, fg_focus) local text = "" if t.selected then text = " "..t.name.." "