DWM Fans,
Has anyone attempted to create a toggle border patch? For the most part I
use the monocle layout and prefer to be borderless. But, sometimes if I'm
working with several floating windows borders come in handy. I've created
a toggleborder function which works well enough for my needs. But, when I
toggle the borders, only border of the focused window gets updated. Other
windows' borders get updated as I focusstack through them.
I added a showborder boolean, changed the bit of code that initializes the
border colors to:
/* init appearance */
dc.norm[ColBG] = getcolor(normbgcolor);
dc.norm[ColFG] = getcolor(normfgcolor);
dc.sel[ColBG] = getcolor(selbgcolor);
dc.sel[ColFG] = getcolor(selfgcolor);
if (showborder)
{
dc.norm[ColBorder] = getcolor(normbordercolor);
dc.sel[ColBorder] = getcolor(selbordercolor);
} else {
dc.norm[ColBorder] = getcolor("#000000");
dc.sel[ColBorder] = getcolor("#000000");
}
And, added a toggleborder function:
static void toggleborder(const Arg *arg)
{
showborder = !showborder;
if (showborder)
{
dc.norm[ColBorder] = getcolor(normbordercolor);
dc.sel[ColBorder] = getcolor(selbordercolor);
} else {
dc.norm[ColBorder] = getcolor("#000000");
dc.sel[ColBorder] = getcolor("#000000");
}
arrange();
}
Is there a way to update all windows' borders when toggleborder is called?
Also, are there other users who frequently diable the "focus follows
mouse" functionality in the entrynotify function? Would it be feasable to
add a focusfollowsmouse boolean to config.h and change the entrynotify
function to:
void enternotify(XEvent *e)
{
Client *c;
XCrossingEvent *ev = &e->xcrossing;
if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
return;
if((c = getclient(ev->window)) && focusfollowsmouse)
focus(c);
else
focus(NULL);
}
I've just been changing the focus(c) to focus(NULL) each time I update DWM
but it would be nice to have a setting in config.h that controls it.
Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX
Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!
Received on Mon Jun 23 2008 - 17:34:00 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:51:11 UTC