~speguero/wm-stat-pwr

Power status indicator for tiling window managers and multi-battery setups.
3437e84d — Steven Peguero 3 months ago
rename project name (again)
9d4a892d — Steven Peguero 1 year, 5 months ago
Rename project to wmbattstat
32a2d5f9 — Steven Peguero 1 year, 7 months ago
Change project name to baterio (Esperanto)

clone

read-only
https://git.sr.ht/~speguero/wm-stat-pwr
read/write
git@git.sr.ht:~speguero/wm-stat-pwr

You can also use your local clone with git send-email.

#wm-stat-pwr

wm-stat-pwr is an i3blocks status indicator that reports a percentage of available battery power on your machine, based upon a single battery or a total sum of available power between all present batteries.


#Requirements

  • Linux, or...
  • OpenBSD, or...
  • FreeBSD, with...
  • Python v3.5+

#Disclaimer

Due to the nature of battery technology and issues of inaccuracy from estimated times of remaining life before loss of power, wm-stat-pwr does not, and will never, report such information.

#Install

1) Copy wm-stat-pwr to a directory of your choosing.

2) Edit your i3blocks configuration file and add the following configuration:

[wm-stat-pwr]
command=/path/to/wm-stat-pwr
label=B
interval=1

Specify the full path of wm-stat-pwr in the command argument.

3) Refresh your i3 or Sway session and enjoy.

#Arguments

Argument Description
[none] Defaults to the -t argument.
-t Enable text-based status indicators.
-i Enable icon-based status indicators, which require the Font Awesome font.

#Runtime

The following power status indicators are used:

Status (Text) Status (Icon) Meaning
CHR Lightning Bolt Charging
DIS Battery Discharging
FUL Power Plug Full
PLG Power Plug Plugged In
NBF [none] No Battery Found
PNS [none] Platform Not Supported
??? [none] Unknown

If one or more batteries are present, one of the first four status indicators will be displayed along with a power percentage:

CHR 84%

#License

Refer to the LICENSE file for details.