summaryrefslogtreecommitdiff
path: root/i3status.c
diff options
context:
space:
mode:
authorAxel Wagner <mail@merovius.de>2010-06-18 01:53:27 +0200
committerMichael Stapelberg <michael@stapelberg.de>2010-06-19 12:44:43 +0200
commit6298377bd467a241dc1b05ef54f4e6ce02e06de1 (patch)
tree6c3c5735901c9f40730d2ad60fa9e6ac330d8ef3 /i3status.c
parentda595ee9f7cc487b02109e992e4b2f3f27f78d5a (diff)
Implemented a ddate-module
Diffstat (limited to 'i3status.c')
-rw-r--r--i3status.c10
1 files changed, 10 insertions, 0 deletions
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 <atsutane at freethoughts dot de>
+ * Copyright © 2010 Axel Wagner <mail at merovius dot de>
*
* 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"));
}