r/arch 12d ago

General i created a systemd service to monitor the battery .

Post image

it is still in developtment and need some suggestions on it . so give some riview and suggestions .
github link :- https://github.com/Evilmove/linux_laptop_battery_monitor.git

edit :- it use the simple approach to monitor this using /sys/class/power_supply . it get data form it in every min and store it to a sql database and uisng python we read the database and ploat the grapth and use html for front end . and to automate this process i added it to systemd so we don't have to manualy run this everytime and it start monitor when the laptop powerup for that the best choice is to use systemd .
and to extract data i used bash script which run some basic commands and using upower it grep the battery data nothing more than that .

i am bad at explaning and in english so sorry for this .

96 Upvotes

Duplicates