From d0f9cbade81be60ac2e62bcd7b3e72810fe8e984 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 29 Jul 2008 17:48:39 +0200 Subject: [PATCH] awful: readd support for square in taglist Signed-off-by: Julien Danjou --- icons/taglist/squarefw.png | Bin 0 -> 205 bytes icons/taglist/squarew.png | Bin 0 -> 217 bytes lib/awful.lua.in | 18 +++++++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 icons/taglist/squarefw.png create mode 100644 icons/taglist/squarew.png diff --git a/icons/taglist/squarefw.png b/icons/taglist/squarefw.png new file mode 100644 index 0000000000000000000000000000000000000000..bd141507eb80fb1610fd452d9f47adf8c34e012d GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*O%l>?NMQuIxA1W%>2Br;9yY02Goeag8W(&d<$F z%`0JWE=o--Nlj5G&n(GMaQE~L2yf&Q2P)F=ba4#vIR5tRMn(n&p2Hhv{IB=3f5DV< pjd@Y-W`+~3lh5<;sCZT-GhBYcBJe)7<~dLggQu&X%Q~loCII1AJRSf5 literal 0 HcmV?d00001 diff --git a/icons/taglist/squarew.png b/icons/taglist/squarew.png new file mode 100644 index 0000000000000000000000000000000000000000..38f757ddcaa5ae199bbabe4b70ddc403c8d9132e GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*O%l>?NMQuIxA1W%>23yB2;t0u+)gag8W(&d<$F z%`0JWE=o--Nlj5G&n(GMaQE~L2yf&Q2P!i0ba4#vIR5t1L0$$0p2G)NHvT`A*eu2= zAb+3f-wn@2O}VdKL|;6zZj)2~U~iCrmx;k4l`(`{fQ2ctod>9&!PC{xWt~$(695!R BKKlRw literal 0 HcmV?d00001 diff --git a/lib/awful.lua.in b/lib/awful.lua.in index 3e694c41..beace908 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -771,10 +771,22 @@ end -- @return A string to print. function P.widget.taglist.label.all(t, bg_focus, fg_focus) local text = "" - if t.selected then - text = " "..t.name.." " + local background = "" + local sel = client.focus_get() + if sel and sel:istagged(t) then + background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\"" else - text = " "..t.name.." " + for k, c in pairs(client.get()) do + if c:istagged(t) then + background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\"" + break + end + end + end + if t.selected then + text = " "..P.escape(t.name).." " + else + text = " "..P.escape(t.name).." " end return text end