-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Am 18.02.2011 03:29, Alexander Yakushev wrote: > Greetings, > I got a bit tricky problem. Recently I made myself a pretty > black'n'white theme with dark wallpaper, and all that looks great... if > only taskbar icons (icons that are to the left from program titles in > the taskbar) were grayscale too. I know that I can turn off that icons > but that is a cheap solution. So I want to dynamically paint all these > icons in grayscale mode. > I hack a little Lua, but understanding all the awful.taskbar internal > meat is still too hard for me. Maybe you could give me an advice where > (if at all) in the module I can get access to raw icon images that I can > further turn into grayscale using some common algorithms. > Thank you in advance for your help.
At the end of your rc.lua, do: recurse = true client.add_signal("new", function(c) c:add_signal("property::icon", function() -- Make sure we aren't going into an endless loop when changing the icon if not recurse then return end if not client.icon then return end -- Here you can do something with c.icon, e.g.: c.icon:save("/tmp/icon.png") local h = io.popen("convert -colorspace Gray /tmp/icon.png /tmp/icon2.png") recurse = false c.icon = image("/tmp/icon2.png") recurse = true end) end) No idea if this works (I don't even know if that "convert" call works), but I hope this helps you finding something that works. Cheers, Uli - -- "Do you know that books smell like nutmeg or some spice from a foreign land?" -- Faber in Fahrenheit 451 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBCAAGBQJNXjKaAAoJECLkKOvLj8sGIzcH/3KQGEdLNRbaJ4xKjHkUhB2L 43589x/oEiWaksjWB2p/V1mKXcnEUUg0woeOYvMwQkF+2U9fehQmoVu/ftn4oRJX eSzJ3cJQ8dXthQ2AEhseq3UsjnoAXaJIv5JjzAKQiE8A1xXUqchTVz7iKT6zcc0K Iroi6JGQWXf02iELhHI2aocCj7iXZHl09qpDXRzB5Adhroz00hgNS7v7PrK4HtWL DejwJdk1E6sAfs8TXWiu6E5NRDBx0Eq/DhTVib0nMxCSeO+NgL/zmzK/aEPZfSb0 z+Ca8mhi04yO+2dX1go5XizwKiT2EN/1TGuvao1zvUHa/6vRXGvDDKpCRJ/+vaE= =fOa7 -----END PGP SIGNATURE----- -- To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.