Battery watchdog
btw | ||
btw.1 | ||
COPYING | ||
Makefile | ||
PKGBUILD | ||
README |
BTW(1) User Commands BTW(1) NAME btw - battery watchdog SYNOPSIS btw [-c|--crit value] [-p|--preriod seconds] [-l|--log file] [-j|--syslog] [-s|--summary text] [-b|--body text] [-w|--watch] btw --help btw --version DESCRIPTION Send notification when critical battery level reached. OPTIONS -v, --version Print version and exit. -h, --help Print this help message and exit. -c, --crit value Battery critical value in percents [default: 10] -p, --preriod seconds Battery check out period in seconds [default: 30] -l, --log file Log file [default: ~/.cache/btw.log] -j, --syslog Use logger in- stead of log file. -s, --summary text Custom notification title text. -b, --body text Custom notification body text. -w, --watch Follow to the log file (tail -f). INVOKING Run watchdog in background. See application autostart options for your desktop environment or init system. For example add in your ~/.xinitrc: btw & or create ~/.config/autostart/btw.desktop if you have GNOME Desktop: [Desktop Entry] Name=Laptop battery watchdog (btw) Exec=btw Type=Application LOGGING btw writes battery status log in log file. Set file by --log option. Log format: [date time] [state] [level]% There is: [date time] `date +'%Y-%m-%d %H:%M:%S'` command output. [state] Battery status, can be 'Charging' or 'Discharging'. [level] Battery current level in percents. If --syslog option is passed use following commands to watch log. btw -jw # or journalctl -t btw -f EXAMPLES btw will send notification at every battery checkout while current bat- tery level is lower than critical value. For example, with following command: btw -c 15 -p 30 you will recieve notification every 30 seconds until battery is under 10%. You can set up custom notification text via --summary and --body options. Variables can be used in notification: level Current battery level in percents. state Battery status, can be full, charging or discharging. For example: btw -s 'Battery is very low!' -b 'Status: $state, $level%' FILES ~/.cache/btw.log Log file. /tmp/btw.lock Lock file. Prevents unwanted notifications. SEE ALSO acpi(1), notify-send(1) btw 1.0 2022-01-10 BTW(1)