add resize_hints config
This commit is contained in:
parent
7b165923a8
commit
e3c0478434
3
config.c
3
config.c
|
@ -322,6 +322,9 @@ parse_config(Display * disp, int scr, DC * drawcontext, jdwm_config *jdwmconf)
|
||||||
/* mwfact */
|
/* mwfact */
|
||||||
jdwmconf->mwfact = config_lookup_float(&jdwmlibconf, "jdwm.mwfact");
|
jdwmconf->mwfact = config_lookup_float(&jdwmlibconf, "jdwm.mwfact");
|
||||||
|
|
||||||
|
/* resize_hints */
|
||||||
|
jdwmconf->resize_hints = config_lookup_float(&jdwmlibconf, "jdwm.resize_hints");
|
||||||
|
|
||||||
/* colors */
|
/* colors */
|
||||||
dc.norm[ColBorder] = initcolor(config_lookup_string(&jdwmlibconf, "jdwm.normal_border_color"),
|
dc.norm[ColBorder] = initcolor(config_lookup_string(&jdwmlibconf, "jdwm.normal_border_color"),
|
||||||
disp, scr);
|
disp, scr);
|
||||||
|
|
2
config.h
2
config.h
|
@ -108,6 +108,8 @@ struct jdwm_config
|
||||||
int nmaster;
|
int nmaster;
|
||||||
/** Transparency of unfocused clients */
|
/** Transparency of unfocused clients */
|
||||||
int opacity_unfocused;
|
int opacity_unfocused;
|
||||||
|
/** Respect resize hints */
|
||||||
|
Bool resize_hints;
|
||||||
/** Text displayed in bar */
|
/** Text displayed in bar */
|
||||||
char statustext[256];
|
char statustext[256];
|
||||||
/** Current layout */
|
/** Current layout */
|
||||||
|
|
3
jdwmrc
3
jdwmrc
|
@ -36,6 +36,9 @@ jdwm:
|
||||||
# Number of master windows (used by tile layouts)
|
# Number of master windows (used by tile layouts)
|
||||||
nmaster = 2;
|
nmaster = 2;
|
||||||
|
|
||||||
|
# Resize hints
|
||||||
|
resize_hints = true;
|
||||||
|
|
||||||
# Set of rules to put some windows floating
|
# Set of rules to put some windows floating
|
||||||
# or to tag them on launch
|
# or to tag them on launch
|
||||||
rules = ({ name = "Gimp";
|
rules = ({ name = "Gimp";
|
||||||
|
|
|
@ -122,7 +122,7 @@ _tile(jdwm_config *jdwmconf, const Bool right)
|
||||||
else
|
else
|
||||||
nh = th - 2 * c->border;
|
nh = th - 2 * c->border;
|
||||||
}
|
}
|
||||||
resize(c, nx, ny, nw, nh, False);
|
resize(c, nx, ny, nw, nh, jdwmconf->resize_hints);
|
||||||
if(n > nmaster && th != wah)
|
if(n > nmaster && th != wah)
|
||||||
ny += nh + 2 * c->border;
|
ny += nh + 2 * c->border;
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in New Issue