Battery watchdog
Go to file
2022-11-10 23:07:39 +03:00
btw fix help 2022-11-10 23:07:39 +03:00
btw.1 fix help 2022-11-10 23:07:39 +03:00
COPYING init 2022-11-10 22:09:14 +03:00
Makefile init 2022-11-10 22:09:14 +03:00
PKGBUILD init 2022-11-10 22:09:14 +03:00
README fix help 2022-11-10 23:07:39 +03:00

BTW(1)                           User Commands                          BTW(1)



NAME
       btw - battery watchdog

SYNOPSIS
       btw [-c|--crit level] [-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 level
              Battery critical level 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 instead 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 level. For  example,  with  following
       command:

           btw -c 15 -p 30

       you  will  recieve notification every 30 seconds until battery is under
       15%.  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-10-10                            BTW(1)