diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2011-11-26 18:26:38 +0000 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2011-11-26 18:26:38 +0000 |
commit | 3471ff39f865a450444774237c435bceaaac1c01 (patch) | |
tree | 1a2a09adfd1a2b7fa01c873d0b899c5481ee6d73 /i3status.c | |
parent | 40012ed7c62f72f97a183bf72e80c137426d8791 (diff) |
battery: implement "path" option for batteries with non-standard paths
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -209,6 +209,7 @@ int main(int argc, char *argv[]) { cfg_opt_t battery_opts[] = { CFG_STR("format", "%status %percentage %remaining", CFGF_NONE), + CFG_STR("path", "/sys/class/power_supply/BAT%d/uevent", CFGF_NONE), CFG_BOOL("last_full_capacity", false, CFGF_NONE), CFG_END() }; @@ -371,7 +372,7 @@ int main(int argc, char *argv[]) { print_eth_info(title, cfg_getstr(sec, "format_up"), cfg_getstr(sec, "format_down")); CASE_SEC_TITLE("battery") - print_battery_info(atoi(title), cfg_getstr(sec, "format"), cfg_getbool(sec, "last_full_capacity")); + print_battery_info(atoi(title), cfg_getstr(sec, "path"), cfg_getstr(sec, "format"), cfg_getbool(sec, "last_full_capacity")); CASE_SEC_TITLE("run_watch") print_run_watch(title, cfg_getstr(sec, "pidfile"), cfg_getstr(sec, "format")); |