summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-05-01 21:01:25 +0200
committerAaron Marcher <me@drkhsh.at>2018-05-01 21:01:25 +0200
commit4f5ac5d9fe7525713a007727dd06d5aae031f6ac (patch)
treee3ba6d1b736049d33a366f469fff241c9430d90b
parent24b663d6570563a2dc601363c26ebd4d0bb36611 (diff)
Remove battery_power for various reasons
- Battery power cannot be easily gatherable via apm(4) - IMHO it does not represent essential information
-rw-r--r--README2
-rw-r--r--components/battery.c12
-rw-r--r--config.def.h1
-rw-r--r--slstatus.h1
4 files changed, 1 insertions, 15 deletions
diff --git a/README b/README
index 78dc7ab..30cacd4 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@ slstatus is a suckless status monitor for window managers that use WM_NAME
Features
--------
-- Battery percentage/power/state
+- Battery percentage/state
- CPU usage
- CPU frequency
- CPU iowait
diff --git a/components/battery.c b/components/battery.c
index 327d576..86ea2a1 100644
--- a/components/battery.c
+++ b/components/battery.c
@@ -21,18 +21,6 @@
}
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 {
diff --git a/config.def.h b/config.def.h
index 1e3be56..d1cb995 100644
--- a/config.def.h
+++ b/config.def.h
@@ -13,7 +13,6 @@ static const char unknown_str[] = "n/a";
* 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
diff --git a/slstatus.h b/slstatus.h
index 3024a4d..a106070 100644
--- a/slstatus.h
+++ b/slstatus.h
@@ -2,7 +2,6 @@
/* battery */
const char *battery_perc(const char *);
-const char *battery_power(const char *);
const char *battery_state(const char *);
/* cpu */