summaryrefslogtreecommitdiff
path: root/src/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/output.c b/src/output.c
index c153a01..eee458b 100644
--- a/src/output.c
+++ b/src/output.c
@@ -26,6 +26,10 @@ void write_error_to_statusbar(const char *message) {
*/
char *color(const char *colorstr) {
static char colorbuf[32];
+ if (!use_colors) {
+ colorbuf[0] = '\0';
+ return colorbuf;
+ }
#ifdef DZEN
(void)snprintf(colorbuf, sizeof(colorbuf), "^fg(%s)", colorstr);
#elif XMOBAR