diff options
Diffstat (limited to 'src/print_load.c')
-rw-r--r-- | src/print_load.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/print_load.c b/src/print_load.c index d47ecea..8c2343b 100644 --- a/src/print_load.c +++ b/src/print_load.c @@ -6,6 +6,9 @@ void print_load(const char *format) { /* Get load */ + if (output_format == O_I3BAR) + printf("{\"name\":\"load\", \"full_text\":\""); + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(sun) double loadavg[3]; const char *walk; @@ -34,6 +37,10 @@ void print_load(const char *format) { walk += strlen("15min"); } } + + if (output_format == O_I3BAR) + printf("\"}"); + return; error: #endif |