diff options
author | Brendan Van Hook <me@bsvh.me> | 2015-10-02 02:28:53 -0400 |
---|---|---|
committer | Brendan Van Hook <me@bsvh.me> | 2015-10-04 14:52:32 -0400 |
commit | a13b2e7288e943359ccb37be86efb716efbe98c8 (patch) | |
tree | b17acf7436a8b9de6c6d27aa4d82f01f6b8821aa /src/output.c | |
parent | f3125fdfded91144cb9f5b9ea3bf406598f17321 (diff) |
Added support for lemonbar
Diffstat (limited to 'src/output.c')
-rw-r--r-- | src/output.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/output.c b/src/output.c index b2fb1dd..f7a8888 100644 --- a/src/output.c +++ b/src/output.c @@ -11,7 +11,8 @@ #include "i3status.h" /* - * Returns the correct color format for dzen (^fg(color)) or xmobar (<fc=color>) + * Returns the correct color format for dzen (^fg(color)), xmobar (<fc=color>) + * or lemonbar (%{Fcolor}) * */ char *color(const char *colorstr) { @@ -24,6 +25,8 @@ char *color(const char *colorstr) { (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)); + else if (output_format == O_LEMONBAR) + (void)snprintf(colorbuf, sizeof(colorbuf), "%%{F%s}", cfg_getstr(cfg_general, colorstr)); else if (output_format == O_TERM) { /* The escape-sequence for color is <CSI><col>;1m (bright/bold * output), where col is a 3-bit rgb-value with b in the @@ -61,6 +64,8 @@ void print_separator(const char *separator) { printf("^fg(%s)%s^fg()", cfg_getstr(cfg_general, "color_separator"), separator); else if (output_format == O_XMOBAR) printf("<fc=%s>%s</fc>", cfg_getstr(cfg_general, "color_separator"), separator); + else if (output_format == O_LEMONBAR) + printf("%%{F%s}%s%%{F-}", cfg_getstr(cfg_general, "color_separator"), separator); else if (output_format == O_TERM) printf("%s%s%s", color("color_separator"), separator, endcolor()); else if (output_format == O_NONE) |