14 * Returns the correct color format for dzen (^fg(color)) or xmobar (<fc=color>)
17 char *color(const char *colorstr) {
18 static char colorbuf[32];
19 if (!cfg_getbool(cfg_general, "colors")) {
23 if (output_format == O_DZEN2)
24 (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", cfg_getstr(cfg_general, colorstr));
25 else if (output_format == O_XMOBAR)
26 (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", cfg_getstr(cfg_general, colorstr));
27 else if (output_format == O_I3BAR)
28 (void)snprintf(colorbuf, sizeof(colorbuf), "\"color\":\"%s\", ", cfg_getstr(cfg_general, colorstr));
34 * Some color formats (xmobar) require to terminate colors again
38 if (output_format == O_XMOBAR)
43 void print_seperator() {
44 if (output_format == O_DZEN2)
45 printf("^fg(%s)^p(5;-2)^ro(2)^p()^fg()^p(5)", cfg_getstr(cfg_general, "color_separator"));
46 else if (output_format == O_XMOBAR)
47 printf("<fc=%s> | </fc>", cfg_getstr(cfg_general, "color_separator"));
48 else if (output_format == O_I3BAR)
50 else if (output_format == O_NONE)