diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/output.c | 27 | 
1 files changed, 14 insertions, 13 deletions
| diff --git a/src/output.c b/src/output.c index d4d8c2f..3d6666e 100644 --- a/src/output.c +++ b/src/output.c @@ -20,11 +20,11 @@ char *color(const char *colorstr) {                  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)", colorstr); +        else if (output_format == O_XMOBAR) +                (void)snprintf(colorbuf, sizeof(colorbuf), "<fc=%s>", colorstr); +          return colorbuf;  } @@ -33,15 +33,16 @@ char *color(const char *colorstr) {   *   */  char *endcolor() { -#ifdef XMOBAR -        return "</fc>"; -#else -        return ""; -#endif +        if (output_format == O_XMOBAR) +                return "</fc>"; +        else return "";  }  void print_seperator() { -#if defined(DZEN) || defined(XMOBAR) -        printf("%s", BAR); -#endif +        if (output_format == O_DZEN2) +                printf("^fg(#333333)^p(5;-2)^ro(2)^p()^fg()^p(5)"); +        else if (output_format == O_XMOBAR) +                printf("<fc=#333333> | </fc>"); +        else if (output_format == O_NONE) +                printf(" | ");  } | 
