Skip to content

doums/bato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bato bato

bato

A program to send battery level notifications

bato

features - prerequisite - install - configuration - usage - license

Features

Tiny configuration in toml.

Desktop notification:

  • level full
  • level low
  • level critical
  • charging
  • discharging

Prerequisite

A desktop notification server, like Dunst

Install

Configuration

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"

Usage

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

License

Mozilla Public License 2.0