-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
A few things I see here. First, you should not use exec-always but exec for this kind of script otherwise when you will reload your config it will spawn another process. Or if you want to use exec-always at least make sure your script check if there's not another instance running using lock files. Second, you don't need that bloated upower interface you can directly use cat to retrieve the value, it should be somewhere like "/sys/class/power_supply/BAT0". Third, as other pointed out you should use sleep so you script doesn't run as much as your processor can handle, something like "sleep 60" should be way enough since your battery status doesn't change every few seconds. Another way would be to use the Upower Dbus interface and create a signal listener that will listened for Upower to report battery properties changes. I made a script exactly like this: https://github.com/flipflop133/dotfiles/blob/main/scripts/.config/scripts/python/battery_notification/battery_notification.py