all repos — slstatus @ 4f5ac5d9fe7525713a007727dd06d5aae031f6ac

my build of slstatus (tools.suckless.org/slstatus/)

Remove battery_power for various reasons

- Battery power cannot be easily gatherable via apm(4)
- IMHO it does not represent essential information
Aaron Marcher me@drkhsh.at
Tue, 01 May 2018 21:01:25 +0200
commit

4f5ac5d9fe7525713a007727dd06d5aae031f6ac

parent

24b663d6570563a2dc601363c26ebd4d0bb36611

4 files changed, 1 insertions(+), 15 deletions(-)

jump to
M READMEREADME

@@ -6,7 +6,7 @@

Features -------- -- Battery percentage/power/state +- Battery percentage/state - CPU usage - CPU frequency - CPU iowait
M components/battery.ccomponents/battery.c

@@ -21,18 +21,6 @@ bprintf("%d", perc) : NULL;

} const char * - battery_power(const char *bat) - { - int watts; - char path[PATH_MAX]; - - snprintf(path, sizeof(path), "%s%s%s", "/sys/class/power_supply/", - bat, "/power_now"); - return (pscanf(path, "%i", &watts) == 1) ? - bprintf("%d", (watts + 500000) / 1000000) : NULL; - } - - const char * battery_state(const char *bat) { struct {
M config.def.hconfig.def.h

@@ -13,7 +13,6 @@ /*

* function description argument * * battery_perc battery percentage battery name - * battery_power battery power usage battery name * battery_state battery charging state battery name * cpu_perc cpu usage in percent NULL * cpu_iowait cpu iowait in percent NULL
M slstatus.hslstatus.h

@@ -2,7 +2,6 @@ /* See LICENSE file for copyright and license details. */

/* battery */ const char *battery_perc(const char *); -const char *battery_power(const char *); const char *battery_state(const char *); /* cpu */