From 783707906c102c6b30f18a3837cec523974b882c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 11 Oct 2009 23:27:26 +0200 Subject: Implement disk info (%free/%used/%total) --- i3status.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 141a984..e72b677 100644 --- a/i3status.c +++ b/i3status.c @@ -114,6 +114,11 @@ int main(int argc, char *argv[]) { CFG_END() }; + cfg_opt_t disk_opts[] = { + CFG_STR("format", "%free", CFGF_NONE), + CFG_END() + }; + cfg_opt_t opts[] = { CFG_STR_LIST("order", "{ipv6,\"run_watch DHCP\",\"wireless wlan0\",\"ethernet eth0\",\"battery 0\",\"cpu_temperature 0\",load,time}", CFGF_NONE), CFG_SEC("general", general_opts, CFGF_NONE), @@ -122,6 +127,7 @@ int main(int argc, char *argv[]) { CFG_SEC("ethernet", ethernet_opts, CFGF_TITLE | CFGF_MULTI), 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("time", time_opts, CFGF_NONE), CFG_SEC("load", load_opts, CFGF_NONE), @@ -181,6 +187,9 @@ int main(int argc, char *argv[]) { CASE_SEC_TITLE("run_watch") print_run_watch(title, cfg_getstr(sec, "pidfile"), cfg_getstr(sec, "format")); + CASE_SEC_TITLE("disk") + print_disk_info(title, cfg_getstr(sec, "format")); + CASE_SEC("load") print_load(cfg_getstr(sec, "format")); -- cgit v1.2.3