From 6298377bd467a241dc1b05ef54f4e6ce02e06de1 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Fri, 18 Jun 2010 01:53:27 +0200 Subject: Implemented a ddate-module --- i3status.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 903ea92..9087d0c 100644 --- a/i3status.c +++ b/i3status.c @@ -5,6 +5,7 @@ * * Copyright © 2008-2009 Michael Stapelberg and contributors * Copyright © 2009 Thorsten Toepper + * Copyright © 2010 Axel Wagner * * See file LICENSE for license information. * @@ -108,6 +109,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() @@ -134,6 +140,7 @@ int main(int argc, char *argv[]) { CFG_SEC("disk", disk_opts, CFGF_TITLE | CFGF_MULTI), 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() }; @@ -222,6 +229,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")); } -- cgit v1.2.3