On 4 May 2011 20:59, Maciej Sobkowski <macie...@maciejjo.pl> wrote: > I want to add transparency to terminal windows using transset-df. Is > this possible to acomplish within config.h file?
This has been mentioned before on the list, generally transparency is seen as a superfluous extra by most suckless members. ... but I had a pop at writing a patch anyway. Add something like this to your config.h: { "XTerm", NULL, NULL, TAG_ANY, False, -1, trans, { .f = 0.5 } } And apply the patch. It might not apply cleanly since I diff'd from my heavily patched dwm, so you'll have to do some shuftying. Rob.
--- a/dwm.c 2011-05-02 17:07:20.537676024 +0100 +++ b/dwm.c 2011-05-04 21:44:36.799998819 +0100 @@ -129,6 +129,8 @@ unsigned int tags; Bool isfloating, centre; int monitor; + void (*f)(Client *, const Arg *); + const Arg farg; } Rule; /* function declarations */ @@ -295,6 +297,7 @@ #include "patches/grid.c" #include "patches/spawnq.c" #include "patches/shiftview.c" +#include "patches/rule.c" /* function implementations */ void @@ -324,6 +327,8 @@ c->mon = m; if(!r->centre) centre = 0; + if(r->f) + r->f(c, &r->farg); } } if(ch.res_class)
void trans(Client *c, const Arg *a) { char buffer[64]; snprintf(buffer, sizeof buffer, "transset-df -i %ld %f", c->win, a->f); system(buffer); }