06-16-2021, 06:09 PM
i use this
#!/bin/sh
while [ true ]
do
date=$(date +"%r %d/%m/%Y ")
batt=$(cat /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0062/power_supply/cw2015-battery/capacity)
echo $batt% $date
sleep 17
done
called via
status_command
in the bar{} directive
#!/bin/sh
while [ true ]
do
date=$(date +"%r %d/%m/%Y ")
batt=$(cat /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0062/power_supply/cw2015-battery/capacity)
echo $batt% $date
sleep 17
done
called via
status_command
in the bar{} directive