+ cfg_opt_t disk_opts[] = {
+ CFG_STR("format", "%free", CFGF_NONE),
+ CFG_STR("prefix_type", "binary", CFGF_NONE),
+ CFG_STR("threshold_type", "percentage_avail", CFGF_NONE),
+ CFG_FLOAT("low_threshold", 0, CFGF_NONE),
+ CFG_CUSTOM_ALIGN_OPT,
+ CFG_CUSTOM_COLOR_OPTS,
+ CFG_CUSTOM_MIN_WIDTH_OPT,
+ CFG_END()
+ };
+
+ cfg_opt_t volume_opts[] = {
+ CFG_STR("format", "♪: %volume", CFGF_NONE),
+ CFG_STR("format_muted", "♪: 0%%", CFGF_NONE),
+ CFG_STR("device", "default", CFGF_NONE),
+ CFG_STR("mixer", "Master", CFGF_NONE),
+ CFG_INT("mixer_idx", 0, CFGF_NONE),
+ CFG_CUSTOM_ALIGN_OPT,
+ CFG_CUSTOM_COLOR_OPTS,
+ CFG_CUSTOM_MIN_WIDTH_OPT,
+ CFG_END()
+ };
+
+ cfg_opt_t opts[] = {
+ CFG_STR_LIST("order", "{}", CFGF_NONE),
+ CFG_SEC("general", general_opts, CFGF_NONE),
+ CFG_SEC("run_watch", run_watch_opts, CFGF_TITLE | CFGF_MULTI),
+ CFG_SEC("path_exists", path_exists_opts, CFGF_TITLE | CFGF_MULTI),
+ CFG_SEC("wireless", wireless_opts, CFGF_TITLE | CFGF_MULTI),
+ 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("volume", volume_opts, CFGF_TITLE | CFGF_MULTI),
+ CFG_SEC("ipv6", ipv6_opts, CFGF_NONE),
+ CFG_SEC("time", time_opts, CFGF_NONE),
+ CFG_SEC("tztime", tztime_opts, CFGF_TITLE | CFGF_MULTI),
+ CFG_SEC("ddate", ddate_opts, CFGF_NONE),
+ CFG_SEC("load", load_opts, CFGF_NONE),
+ CFG_SEC("cpu_usage", usage_opts, CFGF_NONE),
+ CFG_CUSTOM_COLOR_OPTS,
+ CFG_END()
+ };
+
+ char *configfile = NULL;