On Thu, Jan 5, 2012 at 11:14 PM, Anurag Priyam <[email protected]> wrote:
> On Thu, Jan 5, 2012 at 10:46 PM, Uli Schlachter <[email protected]> wrote:
>> Could you change the first patch, turn [▪] into ▪ in the second patch and 
>> re-send?
>
> In a while.

There you go. Though, I would still argue for '[foo]', instead of just
'foo'. I think it makes for a better default. I use floating + ontop
very frequently, and it feels a little weird when those symbols
clutter up.

-- 
Anurag Priyam
From eb2f1bfd1468fb6aaf84e144f3034c58deb0c07f Mon Sep 17 00:00:00 2001
From: Anurag Priyam <[email protected]>
Date: Fri, 6 Jan 2012 00:01:27 +0530
Subject: [PATCH 1/2] tasklist: allow 'symbols' used to mark certain client
 properties to be themed

Symbols (or, visual hints) used to indicate that a client is: 'ontop' or
'floating' or 'maximized_horizontal' or 'maximized_vertical', can now be
defined in the theme, or passed to awful.widget.tasklist() as the last, 'style'
argument (see docs).

Signed-off-by: Anurag Priyam <[email protected]>
---
 lib/awful/widget/tasklist.lua.in |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in
index 8d4c48c..0cc58fa 100644
--- a/lib/awful/widget/tasklist.lua.in
+++ b/lib/awful/widget/tasklist.lua.in
@@ -38,10 +38,17 @@ local function tasklist_label(c, args)
     local bg = nil
     local text = "<span font_desc='"..font.."'>"
     local name = ""
-    if c.ontop then name = name .. "⌃" end
-    if client.floating.get(c) then name = name .. "‚úà" end
-    if c.maximized_horizontal then name = name .. '⬌' end
-    if c.maximized_vertical then name = name .. "⬍" end
+
+    -- symbol to use to indicate certain client properties
+    local ontop = args.ontop or theme.tasklist_ontop or '⌃'
+    local floating = args.floating or theme.tasklist_floating or '‚úà'
+    local maximized_horizontal = args.maximized_horizontal or theme.tasklist_maximized_horizontal or '⬌'
+    local maximized_vertical = args.maximized_vertical or theme.tasklist_maximized_vertical or '⬍'
+
+    if c.ontop then name = name .. ontop end
+    if client.floating.get(c) then name = name .. floating end
+    if c.maximized_horizontal then name = name .. maximized_horizontal end
+    if c.maximized_vertical then name = name .. maximized_vertical end
     if c.minimized then
         name = name .. (util.escape(c.icon_name) or util.escape(c.name) or util.escape("<untitled>"))
     else
@@ -96,7 +103,10 @@ end
 -- fg_urgent The foreground color for urgent clients.
 -- bg_minimize The background color for minimized clients.
 -- fg_minimize The foreground color for minimized clients.
--- floating_icon The icon for flating clients.
+-- floating Symbol to use for floating clients.
+-- ontop Symbol to use for ontop clients.
+-- maximized_horizontal Symbol to use for clients that have been horizontally maximized.
+-- maximized_vertical Symbol to use for clients that have been vertically maximized.
 -- font The font.
 function new(screen, filter, buttons, style)
     local w = flex.horizontal()
-- 
1.7.7.3

From 9f17ca2ad6b3cd4e7e6b5faccda9504436383c08 Mon Sep 17 00:00:00 2001
From: Anurag Priyam <[email protected]>
Date: Fri, 6 Jan 2012 00:54:33 +0530
Subject: [PATCH 2/2] tasklist: indicate sticky clients with a solid square as
 the default

Signed-off-by: Anurag Priyam <[email protected]>
---
 lib/awful/widget/tasklist.lua.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/awful/widget/tasklist.lua.in b/lib/awful/widget/tasklist.lua.in
index 0cc58fa..61fee41 100644
--- a/lib/awful/widget/tasklist.lua.in
+++ b/lib/awful/widget/tasklist.lua.in
@@ -40,11 +40,13 @@ local function tasklist_label(c, args)
     local name = ""
 
     -- symbol to use to indicate certain client properties
+    local sticky = args.sticky or theme.tasklist_sticky or "▪"
     local ontop = args.ontop or theme.tasklist_ontop or '⌃'
     local floating = args.floating or theme.tasklist_floating or '✈'
     local maximized_horizontal = args.maximized_horizontal or theme.tasklist_maximized_horizontal or '⬌'
     local maximized_vertical = args.maximized_vertical or theme.tasklist_maximized_vertical or '⬍'
 
+    if c.sticky then name = name .. sticky end
     if c.ontop then name = name .. ontop end
     if client.floating.get(c) then name = name .. floating end
     if c.maximized_horizontal then name = name .. maximized_horizontal end
-- 
1.7.7.3

Reply via email to