From 94b98becffe16c861a76895f5773fa0190b3ba47 Mon Sep 17 00:00:00 2001 From: ozpv <39195175+ozpv@users.noreply.github.com> Date: Fri, 26 Jul 2024 23:50:01 +0000 Subject: add battery --- Makefile | 1 + config.def.h | 2 +- slstatus.h | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3