~speguero/wmbattstat

9d4a892d8f323063577f598a5cba721948d734c0 — Steven Peguero 11 months ago 32a2d5f master
Rename project to wmbattstat
4 files changed, 19 insertions(+), 19 deletions(-)

M README.md
M contrib/i3blocks.ini
M contrib/lemonbar.sh
R baterio => wmbattstat
M README.md => README.md +7 -7
@@ 1,6 1,6 @@
# baterio
# wmbattstat

`baterio` is an [`i3blocks`](https://github.com/vivien/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.
`wmbattstat` is an [`i3blocks`](https://github.com/vivien/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.

---



@@ 21,22 21,22 @@

## Disclaimer

Due to the nature of battery technology and issues of inaccuracy from estimated times of remaining life before loss of power, `baterio` does not, and will never, report such information.
Due to the nature of battery technology and issues of inaccuracy from estimated times of remaining life before loss of power, `wmbattstat` does not, and will never, report such information.

## Install

__1)__ Copy `baterio` to a directory of your choosing.
__1)__ Copy `wmbattstat` to a directory of your choosing.

__2)__ Edit your `i3blocks` configuration file and add the following configuration:

```ini
[baterio]
command=/path/to/baterio
[wmbattstat]
command=/path/to/wmbattstat
label=B
interval=1
```

Specify the full path of `baterio` in the `command` argument.
Specify the full path of `wmbattstat` in the `command` argument.

__3)__ Refresh your i3 or Sway session and enjoy.


M contrib/i3blocks.ini => contrib/i3blocks.ini +2 -2
@@ 1,4 1,4 @@
[batterieees]
command=/path/to/baterio
[wmbattstat]
command=/path/to/wmbattstat
label=B
interval=1

M contrib/lemonbar.sh => contrib/lemonbar.sh +5 -5
@@ 1,17 1,17 @@
#!/bin/sh

# Provides de-facto baterio support for lemonbar (https://github.com/lemonboy/bar).
# Provides de-facto wmbattstat support for lemonbar (https://github.com/lemonboy/bar).
#
# To test, run the following in a shell:
# 
# `sh lemonbar.sh | lemonbar`
#
# Copy the function found below over to your own lemonbar config, change the path
# of baterio to wherever you have it stored, and enjoy.
# of wmbattstat to wherever you have it stored, and enjoy.

baterio()
wmbattstat()
{
	script_file="$(../baterio)"
	script_file="$(../wmbattstat)"
	output_text="$(echo $script_file | awk -F ' ' '{ print $1 " " $2 }')"
	output_color="$(echo $script_file | awk -F ' ' '{ print $3 }')"



@@ 20,7 20,7 @@ baterio()

while true
do
	baterio
	wmbattstat
	sleep 1
done


R baterio => wmbattstat +5 -5
@@ 1,11 1,11 @@
#!/usr/bin/env python3

'''
   ___________________
  |                   |_
  |   B A T E R I O   | |
  |   *- - - - - -*   |_|
  |___________________|
   _________________________
  |                         |_
  |   W M B A T T S T A T   | |
  |   *- - - - - - - - -*   |_|
  |_________________________|

'''