BATSIGNAL(1)
π NAME π
Okay bestie, this is the BATSIGNAL(1) page from the General Commands Manual, and itβs all about batsignal β a lightweight battery daemon written in C that notifies the user about battery states. Itβs intended for minimal window managers, but no cap it can be used in any environment that supports desktop notifications via libnotify. β¨
π¦ SYNOPSIS π¦
batsignal [OPTIONS]
πΈ DESCRIPTION πΈ
batsignal is giving lightweight battery daemon realness, written in C, and its whole job is notifying the user about battery states. Itβs intended for minimal window managers, but bestie it can absolutely be used in any environment that supports desktop notifications via libnotify. π
β¨ OPTIONS β¨
-hβ display help.-vβ display version information.-bβ runbatsignalas background daemon.-oβ check battery once and exit.-iβ ignore missing battery errors.-eβ cause notifications to expire.-Nβ disable desktop notifications.-wLEVEL β battery warning LEVEL (default15).0disables this level.-cLEVEL β critical battery LEVEL (default5).0disables this level.-dLEVEL β battery danger LEVEL (default2).0disables this level.-fLEVEL β battery full LEVEL (default0).0disables this level.-pβ show a message when the battery begins charging or discharging.-WMESSAGE β show MESSAGE when battery is at warning level.-CMESSAGE β show MESSAGE when battery is at critical level.-DCOMMAND β run COMMAND when battery is at danger level.-FMESSAGE β show MESSAGE when battery is at full level.-PMESSAGE β show MESSAGE when battery is charging, if-poption is set.-UMESSAGE β show MESSAGE when battery is discharging, if-poption is set.-MCOMMAND β send each message using COMMAND.-nNAME β battery device NAME β multiple batteries may be separated by commas (defaultBAT0).-mSECONDS β minimum number of SECONDS (default60) to wait between battery checks. Setting SECONDS to0disables polling and waits for theUSR1signal before checking battery level. Prefixing SECONDS with a+(ex:-m +10) will force a check at SECONDS intervals, regardless of battery level.-aAPP_NAME β app name used in notifications (default:batsignal).-IICON β display specified ICON in notifications.
π CONFIGURATION π
Options can be passed to batsignal as command arguments or placed in a configuration file. Options from the configuration file will be applied first and then may be overridden by command line as arguments. π
The configuration file should include option arguments as documented above, one argument per line. Lines beginning with # and empty lines are ignored. For example, to specify a warning level of 30 and run as a background daemon, the following configuration file could be used:
# Run in background
-b
# Use warning level of 30
-w
30
The following paths are checked in sequence for a configuration file:
BATSIGNAL_CONFIGenvironment variable (if present)$HOME/.config/batsignal(or the config base specificed inXDG_CONFIG_HOME)$HOME/.batsignal/usr/local/etc/batsignal/etc/batsignal
π ENVIRONMENT π
BATSIGNAL_CONFIGβ sets the option configuration file path.XDG_CONFIG_HOMEβ the base path for the XDG config directory. Used in the option file search.
π¦ SIGNALS π¦
batsignal responds to the following signals:
SIGUSR1β sending the processSIGUSR1will cause an immediate battery check to be performed.
π NOTES π
In most cases, batsignal will perform fewer battery state checks while the battery is discharging and the level of charge is not near a warning level. This frequency is affected by the multiplier (-m) option and is never less than <multiplier> seconds. If the "full" level (-f) is set or charge/discharge messages are enabled (-p), batsignal will instead check the battery state every <multiplier> seconds regardless of level of charge. π
If the "full" level (-f) is set, the battery full notification will be triggered at the given level of charge or when the battery status changes to full, whichever occurs first. β
The message COMMAND passed with -M is a C printf-style format string. It can use two string placeholders (%s) that will be replaced by the message text and the current battery level. Be sure to test the command β invalid format strings may cause batsignal to crash.
β οΈ Bestie, seriously test that command. Invalid format strings may cause batsignal to crash. π
Ex:
-M "wall 'Battery warning: %s - Level is %s'"
π COPYRIGHT π
- Copyright 2018-2024 Corey Hinshaw
- Copyright 2016-2017 Aaron Marcher
- License: ISC License
π Cute sign-off: this page is batsignal-1.8.0, BATSIGNAL(1), and the footer doesnβt show a date β so no invented date, bestie. Bye! π
π¦ where this page comes from
- arch rolling: batsignal 1.8.0-2 Β· ISC
- nixos 26.05: batsignal 1.8.0
- nixpkgs unstable: batsignal 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms