colorbuf[0] = '\0';
return colorbuf;
}
-#ifdef DZEN
- (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", colorstr);
-#elif XMOBAR
- (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", colorstr);
-#endif
+ if (output_format == O_DZEN2)
+ (void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", cfg_getstr(cfg_general, colorstr));
+ else if (output_format == O_XMOBAR)
+ (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", cfg_getstr(cfg_general, colorstr));
+
return colorbuf;
}
* Some color formats (xmobar) require to terminate colors again
*
*/
-char *endcolor() {
-#ifdef XMOBAR
- return "</fc>";
-#else
- return "";
-#endif
+char *endcolor(void) {
+ if (output_format == O_XMOBAR)
+ return "</fc>";
+ else return "";
}
-void print_seperator() {
-#if defined(DZEN) || defined(XMOBAR)
- printf("%s", BAR);
-#endif
+void print_seperator(void) {
+ if (output_format == O_DZEN2)
+ printf("^fg(%s)^p(5;-2)^ro(2)^p()^fg()^p(5)", cfg_getstr(cfg_general, "color_separator"));
+ else if (output_format == O_XMOBAR)
+ printf("<fc=%s> | </fc>", cfg_getstr(cfg_general, "color_separator"));
+ else if (output_format == O_NONE)
+ printf(" | ");
}