X-Git-Url: http://pileus.org/git/?p=wmpus;a=blobdiff_plain;f=wm-wmii.c;h=aab29217d453ee6de3dd5523db07a55fd80d2881;hp=ac1333325dfb656ceedc864148f747594623212b;hb=ed3dbd05944250855712283a1c10419bf15f7c12;hpb=79245152446fc0b9e3523135beabbd6783d2026a diff --git a/wm-wmii.c b/wm-wmii.c index ac13333..aab2921 100644 --- a/wm-wmii.c +++ b/wm-wmii.c @@ -17,18 +17,16 @@ #include #include "util.h" +#include "conf.h" #include "sys.h" #include "wm.h" +/* Configuration */ #ifndef MODKEY #define MODKEY alt #endif -#ifndef MARGIN -#define MARGIN 0 -#endif -#ifndef STACK -#define STACK 25 -#endif +static int MARGIN = 0; +static int STACK = 25; /* Enums */ typedef enum { @@ -886,6 +884,10 @@ void wm_init(win_t *root) { printf("wm_init: %p\n", root); + /* Load configuration */ + MARGIN = conf_get_int("main.margin", MARGIN); + STACK = conf_get_int("main.stack", STACK); + /* Hack, fix screen order */ list_t *screens = sys_info(root); list_t *left = screens;