summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozpv <39195175+ozpv@users.noreply.github.com>2024-07-26 23:50:01 +0000
committerGitHub <noreply@github.com>2024-07-26 23:50:01 +0000
commit94b98becffe16c861a76895f5773fa0190b3ba47 (patch)
tree246d8428e1e11b81537ddd923ddff5cdea8a1717
parentbd7ed4928bb327fc7767994154b9d1ddd4b4cc8b (diff)
add battery
-rw-r--r--Makefile1
-rw-r--r--config.def.h2
-rw-r--r--slstatus.h3
3 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ef103c5..6ccf1bf 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ include config.mk
REQ = util
COM =\
+ components/battery\
components/datetime\
components/netspeeds\
components/ram\
diff --git a/config.def.h b/config.def.h
index 904bcba..3e99b1e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -14,7 +14,7 @@ static const struct arg args[] = {
/* run nmcli to get network device for say ethernet */
{ netspeed_rx, "[ %s B/s ]", "wlp2s0" },
- { battery_perc,"[  %s%% ]", "BAT0" },
+ { battery_perc,"[  %s%% ]", "BAT0" },
{ run_command, "[ %s ]", "volume" },
{ ram_perc, "[  %s%% ]", NULL },
{ datetime, "  %s", "%a %b %d %r" },
diff --git a/slstatus.h b/slstatus.h
index aa3f7a0..a273194 100644
--- a/slstatus.h
+++ b/slstatus.h
@@ -12,5 +12,8 @@ const char *num_files(const char *path);
/* ram */
const char *ram_perc(const char *unused);
+/* battery */
+const char *battery_perc(const char *unused);
+
/* run_command */
const char *run_command(const char *cmd);