A program to send battery level notifications
features - prerequisite - install - configuration - usage - license
Tiny configuration in toml.
Desktop notification:
- level full
- level low
- level critical
- charging
- discharging
A desktop notification server, like Dunst
The binary looks for the config file bato.toml
located in
$XDG_CONFIG_HOME/bato/
(default to $HOME/.config/bato/
).
If the config file is not found, bato prints an error and exits.
All config options are detailed here.
Example:
tick_rate = 2
critical_level = 5
low_level = 20
full_design = true
[charging]
summary = "Battery"
body = "Charging"
icon = "battery-good-charging"
[discharging]
summary = "Battery"
body = "Discharging"
icon = "battery-good"
[full]
summary = "Battery"
body = "Full"
icon = "battery-full"
[low]
summary = "Battery"
body = "Low"
icon = "battery-low"
[critical]
summary = "Battery"
body = "Critical!"
icon = "battery-caution"
urgency = "critical"
Run bato via your window manager or desktop environment autostart system
Example with XMonad
myStartupHook = do
spawnOnce "dunst"
spawnOnce "bato -lfile"
Tip
By default bato logs to stdout. To log into a file
run with -lfile
. Logs are located in ~/.cache/bato/
bato -h
Mozilla Public License 2.0