WMBATTERY(1)

πŸ‘‘ WMBATTERY β€” bestie's guide to the dockable battery monitor πŸ’…

okay so this is wmbattery, from the General Commands Manual, section 1. it's a whole mood and also a battery monitor. let's get into it 🫢


✨ NAME ✨

wmbattery β€” the dockable battery monitor. that's her. that's the whole name. πŸŽ€


🌸 SYNOPSIS 🌸

wmbattery [options]

πŸ’– DESCRIPTION πŸ’–

so wmbattery is a battery monitor, and what she does is visually display your system's battery status. like, on your screen. with pixels. iconic.

she can pull battery info from a bunch of sources: upower, HAL, APM, ACPI, or the SPIC controller that lives in some Sony laptops. she's flexible like that, ngl. and she's dockable if you're running WindowMaker or AfterStep β€” but under other window managers she just shows up as a nicely-sized 64x64 application, which is lowkey adorable.

what she displays in that lil icon:

  • if you're plugged in πŸ”Œ
  • if the battery is charging ⚑
  • how many minutes of battery life remain
  • battery life remaining β€” both as a percentage and as a graph
  • battery status: high / low / critical

periodt. that's the whole vibe.


πŸ¦‹ ELEMENTS OF THE DISPLAY πŸ¦‹

the display is made up of these elements, and honestly each one is doing its own little thing:

  • dial β€” the big dial up top. she shows battery life remaining. main character energy fr.
  • time display β€” right under the dial and centered in it. shows how many hours and minutes of battery life are estimated to remain at the current rate of use.
heads up bestie: if ACPI is being used and the battery is charging, this display switches it up β€” instead it shows a countdown (starting with a minus sign) of how many hours and minutes it's estimated to take until the battery is fully charged. πŸ’€
  • power cord β€” the tiny icon of a power cord plug, down in the bottom left. tells you if the laptop is plugged into wall power. if it is, she's lit. ✨
  • charging indicator β€” the lightning bolt icon ⚑, to the right of the plug. tells you if the battery is being charged. if so, it's lit and it connects the plug to the battery.
  • battery icon β€” to the right of the lightning bolt. shows the percentage of battery time. if the battery is removed, the icon goes dim. if the computer is low on power the battery turns yellow; if the computer is critically low on power and about to die because of it, she turns red. 😭

πŸ’… OPTIONS πŸ’…

  • -h β€” display the list of command-line options. your lil help menu, go off.
  • -w secs β€” pause this many seconds between updates. chill mode.
  • -d display β€” use the designated X display.
  • -g {+-}x{+-}y β€” specify geometry. this sets position, not size. important distinction bestie.
  • -b battnum β€” display the given battery. only useful with the HAL or ACPI interfaces on systems with more than one battery. the default is to display the first battery found.
  • -l percent β€” set the percentage at which the battery is considered to be running low. by default this percentage is determined automatically, and you shouldn't need to set it. if you do set it, you should probably also set the -c switch. πŸ‘€
  • -c percent β€” set the percentage at which the battery is considered to be critically low. by default this percentage is determined automatically, and you shouldn't need to set it. if you do set it, you should probably also set the -l switch. they're a package deal fr.
  • -e β€” wmbattery contains code for estimating the time remaining before discharge, and until full charge, and this code is used if no other source of this information is available. this switch makes wmbattery use its time estimation code even if some other estimate is available. she said "i'll do it myself."
  • -s granularity β€” ignore fluctuations less than the specified granularity percent when estimating time. (implies -e)
  • -a file.au β€” play the specified au file (by sending it to /dev/audio) when the battery is low. 🎡
  • -x command β€” execute the specified command when the battery is below critical. the strings %percent%, %minutes% and %seconds% will be translated into the appropriate values.
  • -i β€” display as icon.
  • -n β€” disable the dial graphic.

⭐ EXAMPLE ⭐

start at 10% battery to execute 'echo' including status information:

wmbattery -c 10 -x "echo Status: %percent%% - %minutes% minutes, %seconds% seconds left"

πŸŽ€ AUTHOR πŸŽ€

Joey Hess <joey@kitenet.net> β€” the icon herself, we stan 🫢


and that's the whole page bestie!! it's the WMBATTERY(1) page, living in the General Commands Manual β€” no version number or date to be found up in here, just pure section-1 energy. go forth and monitor that battery. slay πŸ’–βœ¨πŸ”‹