dotfiles/config/.scripts/battery_stats.sh

11 lines
209 B
Bash
Executable File

#!/bin/bash
FILENAME=$(date -I)
while true; do
TIMESTAMP=$(date +%s)
STATS=$(acpi | sed "s/.*\([0-9]\{2\}\)%.*/\1/")
echo "$TIMESTAMP,$STATS" >> ~/.scripts/battery_$FILENAME.log
sleep 1
done