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