X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3status.c;h=b83b1f3ab0660082bf2ef720638a32d06f4ead0c;hb=494efd49a26ed96d7b0d3d4f69099ccd83e2ccba;hp=76b63499ab4c3555d45f3469a8043ed6a015884c;hpb=4ea804b751f9394b7b10b520212169a491c698a6;p=i3%2Fi3status diff --git a/i3status.c b/i3status.c index 76b6349..b83b1f3 100644 --- a/i3status.c +++ b/i3status.c @@ -44,7 +44,8 @@ CFG_STR_CB("align", NULL, CFGF_NONE, parse_align) #define CFG_COLOR_OPTS(good, degraded, bad) \ - CFG_STR("color_good", good, CFGF_NONE), \ + CFG_STR("color_good", good, CFGF_NONE) \ + , \ CFG_STR("color_degraded", degraded, CFGF_NONE), \ CFG_STR("color_bad", bad, CFGF_NONE) @@ -226,9 +227,10 @@ static char *resolve_tilde(const char *path) { } else { head = globbuf.gl_pathv[0]; result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1); - strncpy(result, head, strlen(head)); - if (tail) - strncat(result, tail, strlen(tail)); + strcpy(result, head); + if (tail) { + strcat(result, tail); + } } globfree(&globbuf); @@ -376,7 +378,7 @@ int main(int argc, char *argv[]) { CFG_STR("threshold_type", "time", CFGF_NONE), CFG_BOOL("last_full_capacity", false, CFGF_NONE), CFG_BOOL("integer_battery_capacity", false, CFGF_NONE), - CFG_BOOL("hide_seconds", false, CFGF_NONE), + CFG_BOOL("hide_seconds", true, CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_COLOR_OPTS, CFG_CUSTOM_MIN_WIDTH_OPT,