]> git.sur5r.net Git - i3/i3status/blobdiff - i3status.c
Allow to print eth information on NetBSD
[i3/i3status] / i3status.c
index c6973f7d8246a9df6d2843a65d632df1b116b6b5..e99e627be4557d386bd5de1c301c6e91596f7750 100644 (file)
@@ -261,7 +261,7 @@ int main(int argc, char *argv[]) {
 
         cfg_opt_t load_opts[] = {
                 CFG_STR("format", "%1min %5min %15min", CFGF_NONE),
-                CFG_INT("max_threshold", 5, CFGF_NONE),
+                CFG_FLOAT("max_threshold", 5, CFGF_NONE),
                 CFG_CUSTOM_COLOR_OPTS,
                 CFG_END()
         };
@@ -442,8 +442,8 @@ int main(int argc, char *argv[]) {
                 if (output_format == O_I3BAR)
                         yajl_gen_array_open(json_gen);
                 else if (output_format == O_TERM)
-                        /* Restore the cursor-position */
-                        printf("\033[u");
+                        /* Restore the cursor-position, clear line */
+                        printf("\033[u\033[K");
                 for (j = 0; j < cfg_size(cfg, "order"); j++) {
                         if (j > 0)
                                 print_seperator();
@@ -488,7 +488,7 @@ int main(int argc, char *argv[]) {
 
                         CASE_SEC("load") {
                                 SEC_OPEN_MAP("load");
-                                print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getint(sec, "max_threshold"));
+                                print_load(json_gen, buffer, cfg_getstr(sec, "format"), cfg_getfloat(sec, "max_threshold"));
                                 SEC_CLOSE_MAP;
                         }