* Kevin Monceaux <Kevin_AT_RawFedDogs.net> [080623 19:42]:
> 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();
> }
>
My monocle just do this
resize(c, sx-c->border, sy-c->border, sw, sh, False);
to hide borders..
> 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.
>
Is your focus-on-click really working? I'm not with dwm atm, so if
you have client A focused and click on client B's button (if it's gui),
is it pressed or do you need 2 clicks, one for focus and second for actual
pressing?
-- Alexander Polakov | http://rootshell.be/~polachok/Received on Mon Jun 23 2008 - 18:33:39 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:51:15 UTC