]> git.sur5r.net Git - i3/i3status/blobdiff - i3status.c
Add fernandotcl to copyright notice
[i3/i3status] / i3status.c
index 59fedf838600d706adf104188ecef0c6daa8fb2f..64fac76997138321866cf87c8c7b708bea705cf6 100644 (file)
@@ -5,6 +5,8 @@
  *
  * Copyright © 2008-2009 Michael Stapelberg and contributors
  * Copyright © 2009 Thorsten Toepper <atsutane at freethoughts dot de>
+ * Copyright © 2010 Axel Wagner <mail at merovius dot de>
+ * Copyright © 2010 Fernando Tarlá Cardoso Lemos <fernandotcl at gmail dot com>
  *
  * See file LICENSE for license information.
  *
@@ -92,7 +94,8 @@ int main(int argc, char *argv[]) {
         };
 
         cfg_opt_t ipv6_opts[] = {
-                CFG_STR("format", "%ip", CFGF_NONE),
+                CFG_STR("format_up", "%ip", CFGF_NONE),
+                CFG_STR("format_down", "no IPv6", CFGF_NONE),
                 CFG_END()
         };
 
@@ -107,6 +110,11 @@ int main(int argc, char *argv[]) {
                 CFG_END()
         };
 
+        cfg_opt_t ddate_opts[] = {
+                CFG_STR("format", "%{%a, %b %d%}, %Y%N - %H", CFGF_NONE),
+                CFG_END()
+        };
+
         cfg_opt_t load_opts[] = {
                 CFG_STR("format", "%5min %10min %15min", CFGF_NONE),
                 CFG_END()
@@ -131,8 +139,9 @@ int main(int argc, char *argv[]) {
                 CFG_SEC("battery", battery_opts, CFGF_TITLE | CFGF_MULTI),
                 CFG_SEC("cpu_temperature", temp_opts, CFGF_TITLE | CFGF_MULTI),
                 CFG_SEC("disk", disk_opts, CFGF_TITLE | CFGF_MULTI),
-                CFG_SEC("ipv6", ipv6_opts, CFGF_TITLE),
+                CFG_SEC("ipv6", ipv6_opts, CFGF_NONE),
                 CFG_SEC("time", time_opts, CFGF_NONE),
+                CFG_SEC("ddate", ddate_opts, CFGF_NONE),
                 CFG_SEC("load", load_opts, CFGF_NONE),
                 CFG_END()
         };
@@ -198,7 +207,7 @@ int main(int argc, char *argv[]) {
                         const char *current = cfg_getnstr(cfg, "order", j);
 
                         CASE_SEC("ipv6")
-                                print_ipv6_info(cfg_getstr(sec, "format"));
+                                print_ipv6_info(cfg_getstr(sec, "format_up"), cfg_getstr(sec, "format_down"));
 
                         CASE_SEC_TITLE("wireless")
                                 print_wireless_info(title, cfg_getstr(sec, "format_up"), cfg_getstr(sec, "format_down"));
@@ -221,6 +230,9 @@ int main(int argc, char *argv[]) {
                         CASE_SEC("time")
                                 print_time(cfg_getstr(sec, "format"));
 
+                        CASE_SEC("ddate")
+                                print_ddate(cfg_getstr(sec, "format"));
+
                         CASE_SEC_TITLE("cpu_temperature")
                                 print_cpu_temperature_info(atoi(title), cfg_getstr(sec, "format"));
                 }