Re: [dev] [dwm] ncol layout
> keybinding), so increasing nmaster and moving that window into the
s/increasing/decreasing/
> ... Anyway it seems like my
> explanation isn't clear so I'll try to implement it and post a patch
Okay, so not knowing the dwm source very well I'm having trouble
implementing this, but I think these excerpts illustrate what I'm
TRYING to do (and I would appreciate it if someone more knowledgeable
than myself could help me fix it). And I'm not really suggesting we
change what mod+shift+enter does, I just thought it would help clarify
that my idea is to replace two incnmaster keybindings with one
keybinding which is a second form of zoom.
config.def.h:
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v
= dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v
= termcmd } },
+ { MODKEY, XK_n, spawn, {.v
= termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
- { MODKEY, XK_i, incnmaster, {.i = +1 } },
- { MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f
= -0.05} },
{ MODKEY, XK_l, setmfact, {.f
= +0.05} },
- { MODKEY, XK_Return, zoom, {0} },
+ { MODKEY, XK_Return, zoom, {.i = 0 } },
+ { MODKEY|ShiftMask, XK_Return, zoom, {.i = 1 } },
dwm.c:
void
zoom(const Arg *arg) {
Client *c = selmon->sel;
+ int inc = arg->i;
+ /* if the selected client is in the stack, increment nmaster,
otherwise decrement */
+ // inc *= instack(c) ? +1 : -1;
if(!selmon->lt[selmon->sellt]->arrange
|| (selmon->sel && selmon->sel->isfloating))
return;
if(c == nexttiled(selmon->clients))
if(!c || !(c = nexttiled(c->next)))
return;
+ incnmaster(inc);
pop(c);
}
Received on Mon Oct 31 2011 - 05:42:16 CET
This archive was generated by hypermail 2.3.0
: Mon Oct 31 2011 - 05:48:03 CET