Low Battery Alarm
Plays a customizable alarm when a laptop battery reaches a low or critical charge level
Author: communism420
Low Battery Alarm plays a repeating, clearly audible alarm when a laptop is
discharging and reaches a configured low or critical battery level. It is useful
when the laptop is left performing a long-running task in another room and a
normal desktop notification might not be noticed.
By default, low-battery alerts begin at 10% and repeat every 120 seconds.
Critical alerts begin at 5% and repeat every 30 seconds. Critical alerts continue
below 5%; 5% is the entry threshold, not a lower cutoff. Alerts stop when external
power is connected and can start again during a later discharge cycle. AC/DC
changes are handled through Windows power notifications, so an active waveform is
stopped immediately instead of waiting for the next polling interval.
Custom sound and fallback
Enter the complete WAV path manually in WAV file path, or use Browse...
in the custom configuration window to select it with Windows Explorer. A manual
path change saved in Windhawk replaces a path previously selected in the custom
window. To open the window, enable Open alarm configuration and save the
settings. The topmost window also lists the Windows default output roles and
every active Core Audio output device. It stores the selected device by its
stable endpoint ID. To reopen the window, disable the option and save, then
enable it and save again. An enabled request is handled only once, so saving
unrelated settings does not reopen the window. It also opens automatically on
the first run, before an output selection has been stored.
WAV is the guaranteed supported custom format. If no file has been selected, or
if the selected file is later removed, becomes inaccessible, is not a WAV file,
or cannot be played, the mod logs the reason. When the fallback option is
enabled, the Windows critical system sound is used instead. A short, clearly
audible, and recognizable WAV file is recommended.
Volume and testing
The mod can temporarily change the selected output device's master volume and can
temporarily unmute it while an alert is playing. The previous volume and mute
state are normally restored afterward. If the user changes the volume during
playback, the new value is preserved when the change can be detected by comparing
it with the exact value applied by the mod.
Enable Test sound after settings change and save the settings to request one
test alert. The test uses the current sound and volume settings without changing
the battery state machine. The option is evaluated only when settings are saved;
it does not run during normal polling.
Desktop computers without a system battery are ignored. The mod creates no
persistent UI, console, tray icon, or external player. It runs in a dedicated
Windhawk tool process and uses low-overhead battery-monitoring, power-notification,
and controlled sound-playback threads.