From e9407c967082a57bfff98b39711f0be4e639c52e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Jul 2008 12:34:42 +0200 Subject: [PATCH] awesomerc: display icons when client is floating Signed-off-by: Julien Danjou --- awesomerc.lua.in | 12 +++++++++--- icons/floating.png | Bin 0 -> 401 bytes icons/floatingw.png | Bin 0 -> 401 bytes 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 icons/floating.png create mode 100644 icons/floatingw.png diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 6de7c00c..f9f8a1d9 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -92,10 +92,16 @@ mytasklist:mouse_add(mouse({ }, 1, function (object, c) c:focus_set(); c:raise() 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) - if client.focus_get() == c then - return " </span> " + local text = "" + if c.floating then + text = text .. "<bg image=\"@AWESOME_ICON_PATH@/floatingw.png\" align=\"right\"/>" end - return " <title/> " + if client.focus_get() == c then + text = text .. " <bg color='"..bg_focus.."'/><span color='"..fg_focus.."'><title/></span> " + else + text = text .. " <title/> " + end + return text end -- Create a textbox widget diff --git a/icons/floating.png b/icons/floating.png new file mode 100644 index 0000000000000000000000000000000000000000..90bf19e8259afe65010375cf59f8c85520f588d2 GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~g!3HGv?z=Y!NHG=%xjQkeJ16rJ$YD$Jc6R~N zK=9LfcRi5eEbxddW?<kJ24O~qS#u<Sg6t)pzOL*y*g3hB_%`r(b^?VYOI#yLobz*Y zQ}ap~oQqNuOHxx5$}>wc6x=<11Hv2m#DR+5c)B=-Xq=yValbZeg2=It=U*$8D!(#{ zSR$dz=Bc^+=sP~6fN}%xF3JB*XX6!`=XyTj4^XmSq@%a;^wX$wYs()Ti@dk}^5;39 zYpqzP7&d5|{8?*d&@QNvz^oqO5YC;<A6C$(y2R|uL(b4QkAz-3sxD=5zQJ{BZpCX2 zGxg~k+IDwbJfJ;oV`tR0{SK^meQPQXyK_`s?Dsp9q;`33l05s4znYI-a{e9h-nLb0 zFFVikwkdy)Z;)lqsyJq|Z-cnuYsZL#yj$9Lb~x%BTTt!uSc8MFus2X9S*E|jU)OJ2 n*X9%PTwV27L&S<dnO`)oOR#jj|Ecph(BBN6u6{1-oD!M<_}`T3 literal 0 HcmV?d00001 diff --git a/icons/floatingw.png b/icons/floatingw.png new file mode 100644 index 0000000000000000000000000000000000000000..d41b2d96173412f032a6f91bd01b780be188aa36 GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~g!3HGv?z=Y!NHG=%xjQkeJ16rJ$YD$Jc6R~N zK=9LfcRi5eEbxddW?<kJ24O~qS#u<Sg6t)pzOL*y*g3i6IAdooy$TePEOCt}an8@p zP0cG|a4t$sEJ;mKD9<d(P;mG34G3@K69+1K<LTlUqH%ue#r@hx10{}sJb!S}lpwd} zDe@-^PTMDZR@ZQAu0N2K9<c58y1FS>^HL2ZG$c8>nJ>Q8+RL+VyIyJjp4U45^S>9* zdp@VhZPI3y_N7z8{xP&o)={6y%U0Ono|CYo-J(s`CRw=Fk(c+*uV=EQKFU{T9=Dqn z`b@}rMn?I(!<=@1Q`oEbXZgw`ZYti=Bx>`(w>)acp``7y*S|hv_P+b%=&Ikg>k98F z&I{Wr9kbxtH#V(Gt&<g#wyJDZ(f4$l+@m7t736=(%V_cwi<3<6yfpon9-sbJZRcve oO5LS7&+QYoR^6#vQ*yeNaph5)?@DP>Ab&G>y85}Sb4q9e0F%I%g#Z8m literal 0 HcmV?d00001