The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

ipv6 status color

asked 2013-01-04 17:20:49 +0000

lukaf gravatar image

updated 2013-01-04 17:22:57 +0000

Hi,

I was missing colors in ipv6 module (or how should I call it?) of i3status. I've cloned the master branch, moved END_COLOR above the OUTPUT_FULL_TEXT in print_ipv6_addr.c and here they are. Is this the correct approach?

And thank you for the great WM!

Luka


diff --git a/src/print_ipv6_addr.c b/src/print_ipv6_addr.c
index 8b11e1f..840a0ec 100644
--- a/src/print_ipv6_addr.c
+++ b/src/print_ipv6_addr.c
@@ -123,8 +123,8 @@ void print_ipv6_info(yajl_gen json_gen, char *buffer, const char *format_up, con

         if (addr_string == NULL) {
                 START_COLOR("color_bad");
-                OUTPUT_FULL_TEXT(format_down);
                 END_COLOR;
+                OUTPUT_FULL_TEXT(format_down);
                 return;
         }

@@ -140,6 +140,6 @@ void print_ipv6_info(yajl_gen json_gen, char *buffer, const char *format_up, con
                 }
         }
         START_COLOR("color_good");
-        OUTPUT_FULL_TEXT(buffer);
         END_COLOR;
+        OUTPUT_FULL_TEXT(buffer);
 }
edit retag flag offensive close merge delete

Comments

I have colors in the IPv6 module. Are you using i3bar, dzen2 or xmobar to display i3status’s output?

Michael gravatar imageMichael ( 2013-01-04 17:23:20 +0000 )edit

Hi Michael, sorry about that, I'm using i3bar.

lukaf gravatar imagelukaf ( 2013-01-04 17:41:23 +0000 )edit

I've build i3status without my change and the colors are there. i3status I was using is an older one (2.5.1 from rpm) and I have found the commit that enabled colors. Thank you.

lukaf gravatar imagelukaf ( 2013-01-04 17:51:17 +0000 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2013-01-04 17:54:04 +0000

lukaf gravatar image

Already done with commit f5c96008b0c5ec41b6f136b0af41c56f6af2ccb8. Should test before asking stupid questions :)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-04 17:20:49 +0000

Seen: 174 times

Last updated: Jan 04 '13