diff options
Diffstat (limited to '')
-rw-r--r-- | scoop.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scoop.c b/scoop.c index f5b0692..8c113d5 100644 --- a/scoop.c +++ b/scoop.c @@ -145,11 +145,18 @@ static void formatColor(bool group, struct Event e) { static char network[256]; static char context[256]; if (group && (strcmp(e.network, network) || strcmp(e.context, context))) { - printf("%s%s/%s:\n", (network[0] ? "\n" : ""), e.network, e.context); + printf( + "%s\33[%dm%s/%s\33[m:\n", + (network[0] ? "\n" : ""), + code(color(e.context)), e.network, e.context + ); snprintf(network, sizeof(network), "%s", e.network); snprintf(context, sizeof(context), "%s", e.context); } else if (!group) { - printf("%s/%s: ", e.network, e.context); + printf( + "\33[%dm%s/%s\33[m: ", + code(color(e.context)), e.network, e.context + ); } printf("[%s] ", e.time); |