XBATTBAR(1)
β¨ XBATTBAR β¨ β the battery status icon of your dreams π
okay bestie, we're talking xbattbar from section 1 of the general commands manual, and honestly? she's a little legend. let's go π¦
πΈ NAME πΈ
xbattbar β show battery status in X Window π
β SYNOPSIS β
xbattbar [-a] [-t thickness] [-p interval] [-I color] [-O color]
[-i color] [-o color] [-c] [-r] [-s script-name]
[top | bottom | left | right]
π DESCRIPTION π
xbattbar shows the current (laptop) battery status right there in the X window environment. no cap, it's just vibing on your screen telling you how much juice you have left. π
the battery status is obtained through the APM kernel module. and here's the thing β that APM kernel module depends on your UNIX platform, so consult your documentation for its detail. fr fr, go read your docs, i'm not playing. π
xbattbar shows its battery status in a simple bar indicator. the -a option makes that indicator window keep always on top of your screen β main character energy, she will not be covered up. β¨
the thickness of the indicator is 3 pixels in default, and you can set the thickness as a parameter of the -t option. slay.
this indicator appears in the bottom of the display, as its default. the option top, left, or right forces the status indicator to be at the top, left, and right of the display, respectively. though it's a default, you can also use buttom as the option β and yes, that's literally how the page spells it, iconic typo, we're keeping it. π
π¨ the colors, the drama, the palette π¨
in the case the AC line is on-line (plugged in), the color of the bar indicator consists of "green" and "olive drab" portions. the "green" portion shows its battery charging level. these colors can be changed by the -I and -O options. π
in the other case (AC line is off-line), the "blue" portion of the bar indicator shows the percentage of its remaining battery level. the color conbination for the AC off-line case can be changed by the -i and -o options. π
β° polling o'clock β°
xbattbar tries to know its battery status in every 10 seconds in default. this is achived by APM polling.
- if it is used with option
-cthen ACPI polling will be used. - if it is used with option
-rthen sysfs polling will be used (thanks to Elena Grandi<elena.valhalla@gmail.com>for the script). π«Ά
you can use your external script for check battery status. it must print two lines to STDOUT 'battery=value' and 'ac_line=on|off β yes, exactly like that, go off script bestie. π
the -p option sets the polling interval in second.
lowkey note: the SYNOPSIS lists -s script-name, and that's all she wrote about it on this page β so that's all i'm telling you. no inventing facts in this group chat. π
βοΈ
π±οΈ the hover moment π±οΈ
if the mouse cursor enters in the status indicator, the diagnosis window appears in the center of the display, which shows both AC line status and battery remaining level. this diagnosis window disappears if the mouse cursor leaves from the status indicator.
it's giving peek-a-boo. it's giving tooltip but make it extra. obsessed. ππ
π AUTHOR π
- Suguru Yamaguchi
<suguru@wide.ad.jp> - Akira Kato
<kato@wide.ad.jp> - Noriyuki Shigechika
<nazo@wide.ad.jp> - Dmitry E. Oboukhov
<unera@debian.org>
and that's the whole page, babe. this one shipped out of Debian back on December 5, 1998 β yes, 1998, she's vintage, she's timeless, she's still checking your battery. mwah. π β¨π
π¦ where this page comes from
- debian bookworm: xbattbar 1.4.9-2
- ubuntu jammy: xbattbar 1.4.9-2
- ubuntu noble: xbattbar 1.4.9-2
- ubuntu questing: xbattbar 1.4.9-2
- Copyright (c) 1998-2001 Suguru Yamaguchi <suguru@wide.ad.jp>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms