aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.mk
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2021-11-02 17:26:39 +0000
committerclsr <clsr@clsr.net>2021-11-02 17:26:39 +0000
commit15f5a66646c6c4f9913aa98a64009f0958b0d935 (patch)
treef68f892cb2a86a86437f82d519cb4adc0ff844ea /config.def.mk
parent41deab98a5c0ac7162cd2fe21a786e022cc53670 (diff)
downloaddwmclock-15f5a66646c6c4f9913aa98a64009f0958b0d935.tar.gz
dwmclock-15f5a66646c6c4f9913aa98a64009f0958b0d935.zip
Add power usage displayv1.5.0
Diffstat (limited to 'config.def.mk')
-rw-r--r--config.def.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/config.def.mk b/config.def.mk
index a9dfe19..cfd6766 100644
--- a/config.def.mk
+++ b/config.def.mk
@@ -3,19 +3,25 @@
# enable battery charge display
CFLAGS += -DBATTERY
+# the string to match when the battery is charging; comment out to disable charging detection
+CFLAGS += -DCHARGING=\"Charging\\n\"
+
+# enable battery power usage display; needs POWER_NOW or CURRENT_NOW+VOLTAGE_NOW
+#CFLAGS += -DPOWER
+
# set this to the correct path for your current system
CFLAGS += -DENERGY_FULL=\"/sys/class/power_supply/BAT0/energy_full\"
CFLAGS += -DENERGY_NOW=\"/sys/class/power_supply/BAT0/energy_now\"
CFLAGS += -DSTATUS=\"/sys/class/power_supply/BAT0/status\"
-
-# the string to match when the battery is charging; comment out to disable charging detection
-CFLAGS += -DCHARGING=\"Charging\\n\"
+CFLAGS += -DPOWER_NOW=\"/sys/class/power_supply/BAT0/power_now\"
# possible alternative on some systems
#CFLAGS += -DENERGY_FULL=\"/sys/class/power_supply/BAT0/charge_full\"
#CFLAGS += -DENERGY_NOW=\"/sys/class/power_supply/BAT0/charge_now\"
#CFLAGS += -DSTATUS=\"/sys/class/power_supply/ADP1/online\"
#CFLAGS += -DCHARGING=\"1\\n\"
+#CFLAGS += -DCURRENT_NOW=\"/sys/class/power_supply/BAT0/current_now\"
+#CFLAGS += -DVOLTAGE_NOW=\"/sys/class/power_supply/BAT0/voltage_now\"
# every how many seconds to refresh the battery charge display
CFLAGS += -DBAT_REFRESH_SECONDS=10