diff --git a/src/config.c b/src/config.c index 9bf9d2c..9843abd 100644 --- a/src/config.c +++ b/src/config.c @@ -219,7 +219,7 @@ conf_bar_section(void) conf.selbar.bg = getcolor(fetch_opt_first(selbar, barbg, "bg").str); conf.selbar.fg = fetch_opt_first(selbar, conf.colors.text, "fg").str; - conf.selbar.maxlenght = fetch_opt_first(selbar, "-1", "max_lenght").num; + conf.selbar.maxlength = fetch_opt_first(selbar, "-1", "max_length").num; mouse = fetch_section(selbar, "mouse"); diff --git a/src/infobar.c b/src/infobar.c index 8cd45d5..22f1f6f 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -188,12 +188,12 @@ infobar_draw_selbar(int sc) else if(sel && !infobar[sc].selbar->mapped) barwin_map(infobar[sc].selbar); - if(conf.selbar.maxlenght >= 0 && sel) + if(conf.selbar.maxlength >= 0 && sel) { - str = emalloc(conf.selbar.maxlenght + 4, sizeof(char)); - strncpy(str, sel->title, conf.selbar.maxlenght); + str = emalloc(conf.selbar.maxlength + 4, sizeof(char)); + strncpy(str, sel->title, conf.selbar.maxlength); - if(strlen(sel->title) > conf.selbar.maxlenght) + if(strlen(sel->title) > conf.selbar.maxlength) strcat(str, "..."); } diff --git a/src/structs.h b/src/structs.h index 845efb6..089f08b 100644 --- a/src/structs.h +++ b/src/structs.h @@ -414,7 +414,7 @@ typedef struct { char *fg; uint bg; - int maxlenght; + int maxlength; MouseBinding *mouse; int nmouse; } selbar;