mirror of git://git.suckless.org/dwm
revival of mfact and setmfact
This commit is contained in:
parent
20cd336087
commit
a355782a77
|
@ -20,7 +20,8 @@ Rule rules[] = {
|
||||||
|
|
||||||
/* geometries, s{x,y,w,h} and bh are already initualized here */
|
/* geometries, s{x,y,w,h} and bh are already initualized here */
|
||||||
/* func name bx by bw wx wy ww wh mx my mw mh tx ty tw th mox moy mow moh */
|
/* func name bx by bw wx wy ww wh mx my mw mh tx ty tw th mox moy mow moh */
|
||||||
DEFGEOM(single, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, 0.55*sw, wh, mx+mw, wy, ww-mw, wh, wx, wy, ww, wh)
|
double mfact = 0.55;
|
||||||
|
DEFGEOM(single, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, mfact*sw, wh, mx+mw, wy, ww-mw, wh, wx, wy, ww, wh)
|
||||||
DEFGEOM(dual, 0, 0,1280, 0, bh, ww, wh-bh, wx, wy, 1280,800-bh, 1280, 0, ww-mw, sh, mx, my, mw, mh)
|
DEFGEOM(dual, 0, 0,1280, 0, bh, ww, wh-bh, wx, wy, 1280,800-bh, 1280, 0, ww-mw, sh, mx, my, mw, mh)
|
||||||
|
|
||||||
Geom geoms[] = {
|
Geom geoms[] = {
|
||||||
|
@ -51,6 +52,8 @@ Key keys[] = {
|
||||||
{ MODKEY, XK_j, focusnext, NULL },
|
{ MODKEY, XK_j, focusnext, NULL },
|
||||||
{ MODKEY, XK_k, focusprev, NULL },
|
{ MODKEY, XK_k, focusprev, NULL },
|
||||||
{ MODKEY, XK_r, reapply, NULL },
|
{ MODKEY, XK_r, reapply, NULL },
|
||||||
|
{ MODKEY, XK_h, setmfact, "-0.05" },
|
||||||
|
{ MODKEY, XK_l, setmfact, "+0.05" },
|
||||||
{ MODKEY, XK_Return, zoom, NULL },
|
{ MODKEY, XK_Return, zoom, NULL },
|
||||||
{ MODKEY, XK_Tab, viewprevtag, NULL },
|
{ MODKEY, XK_Tab, viewprevtag, NULL },
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, NULL },
|
{ MODKEY|ShiftMask, XK_c, killclient, NULL },
|
||||||
|
|
6
dwm.1
6
dwm.1
|
@ -69,6 +69,12 @@ Focus next window.
|
||||||
.B Mod1\-k
|
.B Mod1\-k
|
||||||
Focus previous window.
|
Focus previous window.
|
||||||
.TP
|
.TP
|
||||||
|
.B Mod1\-h
|
||||||
|
Decrease master area size.
|
||||||
|
.TP
|
||||||
|
.B Mod1\-l
|
||||||
|
Increase master area size.
|
||||||
|
.TP
|
||||||
.B Mod1\-Return
|
.B Mod1\-Return
|
||||||
Zooms/cycles focused window to/from master area (tiled layouts only).
|
Zooms/cycles focused window to/from master area (tiled layouts only).
|
||||||
.TP
|
.TP
|
||||||
|
|
21
dwm.c
21
dwm.c
|
@ -178,6 +178,7 @@ void scan(void);
|
||||||
void setclientstate(Client *c, long state);
|
void setclientstate(Client *c, long state);
|
||||||
void setgeom(const char *arg);
|
void setgeom(const char *arg);
|
||||||
void setlayout(const char *arg);
|
void setlayout(const char *arg);
|
||||||
|
void setmfact(const char *arg);
|
||||||
void setup(void);
|
void setup(void);
|
||||||
void spawn(const char *arg);
|
void spawn(const char *arg);
|
||||||
void tag(const char *arg);
|
void tag(const char *arg);
|
||||||
|
@ -1462,6 +1463,26 @@ setlayout(const char *arg) {
|
||||||
drawbar();
|
drawbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
setmfact(const char *arg) {
|
||||||
|
double delta;
|
||||||
|
|
||||||
|
if(!arg)
|
||||||
|
return;
|
||||||
|
delta = strtod(arg, NULL);
|
||||||
|
if(arg[0] == '-' || arg[0] == '+') {
|
||||||
|
if(mfact + delta < 0.1 || mfact + delta > 0.9)
|
||||||
|
return;
|
||||||
|
mfact += delta;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(delta < 0.1 || delta > 0.9)
|
||||||
|
return;
|
||||||
|
mfact = delta;
|
||||||
|
}
|
||||||
|
arrange();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setup(void) {
|
setup(void) {
|
||||||
unsigned int i, w;
|
unsigned int i, w;
|
||||||
|
|
Loading…
Reference in New Issue