From bef80146e605b5d2c2d36641ff5fcd7b94087ee1 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Tue, 24 Aug 2010 14:01:48 +0200 Subject: [PATCH] Don't manually strip dzen-formats. Instead "output_format = none" should be used in the i3status-config --- i3bar/src/child.c | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 2b0fb780..9b4e9aa0 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -37,38 +37,8 @@ void cleanup() { } /* - * Since we don't use colors and stuff, we strip the dzen-formatstrings - * - */ -void strip_dzen_formats(char *buffer) { - char *src = buffer; - char *dest = buffer; - while (*src != '\0') { - /* ^ starts a format-string, ) ends it */ - if (*src == '^') { - /* We replace the seperators from i3status by pipe-symbols */ - if (!strncmp(src, "^ro", strlen("^ro"))) { - *(dest++) = ' '; - *(dest++) = '|'; - *(dest++) = ' '; - } - while (*src != ')') { - src++; - } - src++; - } else { - *dest = *src; - src++; - dest++; - } - } - /* The last character is \n, which xcb cannot display */ - *(--dest) = '\0'; -} - -/* - * Callbalk for stdin. We read a line from stdin, strip dzen-formats and store - * the result in statusline + * Callbalk for stdin. We read a line from stdin and store the result + * in statusline * */ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) { @@ -105,7 +75,6 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) { FREE(buffer); return; } - strip_dzen_formats(buffer); FREE(statusline); statusline = buffer; printf("%s\n", buffer); -- 2.39.5