diff --git a/config.c b/config.c index 3956fb6..c7ac752 100644 --- a/config.c +++ b/config.c @@ -140,6 +140,7 @@ init_conf(void) { CFG_SEC("mouse", mouse_button_opts, CFGF_MULTI), CFG_INT("fg_color", 0x000000, CFGF_NONE), CFG_INT("bg_color", 0xFFFFFF, CFGF_NONE), + CFG_INT("x", 0, CFGF_NONE), CFG_END() }; @@ -253,6 +254,7 @@ init_conf(void) { conf.barbutton[i].text = strdup(cfg_getstr(cfgtmp2, "text")); conf.barbutton[i].fg_color = cfg_getint(cfgtmp2, "fg_color"); conf.barbutton[i].bg_color = cfg_getint(cfgtmp2, "bg_color"); + conf.barbutton[i].x = cfg_getint(cfgtmp2, "x"); } cfg_free(cfg); } diff --git a/wmfs.c b/wmfs.c index 0754359..eff39a7 100644 --- a/wmfs.c +++ b/wmfs.c @@ -542,7 +542,7 @@ keymovex(char *cmd) { && !ishide(sel) && !sel->max) { - if((layout[seltag] == Tile && !sel->hint) || layout[seltag] == Max) + if(layout[seltag] == Tile && !sel->hint) return; int tmp; tmp = sel->x + atoi(cmd); @@ -558,7 +558,7 @@ keymovey(char *cmd) { && !ishide(sel) && !sel->max) { - if((layout[seltag] == Tile && !sel->hint) || layout[seltag] == Max) + if(layout[seltag] == Tile && !sel->hint) return; int tmp; tmp = sel->y + atoi(cmd); @@ -590,8 +590,7 @@ void keyresize(char *cmd) { if(sel && !ishide(sel) && !sel->max - && layout[seltag] != Tile - && layout[seltag] != Max) + && layout[seltag] != Tile) { int temph = 0, tempw = 0, modh = 0, modw = 0, tmp = 0; @@ -1141,10 +1140,12 @@ updatebutton(Bool c) { for(i = 0; i < conf.nbutton; ++i) { p = strlen(conf.barbutton[i].text); - - if(i) - pm += strlen(conf.barbutton[i-1].text) * fonty; - x = (!i) ? j : j + pm; + if(!conf.barbutton[i].x) { + if(i) + pm += strlen(conf.barbutton[i-1].text) * fonty; + x = (!i) ? j : j + pm; + } else + x = conf.barbutton[i].x; if(!c) { conf.barbutton[i].win = XCreateWindow(dpy, root, x, 0, p*fonty+2, barheight,