Commit graph

72 commits

Author SHA1 Message Date
Justin Campbell 3d7cfed467 Add @batt_remain_short variable (#52)
* Remove format string count
* Add variable @batt_remain_short

Hides output if battery is charging or charged, and shortens the discharging output to ~H:MM.
2017-06-26 16:54:27 +02:00
Camille TJHOA 8fa3b627b6 Fix typo (#51) 2017-05-08 10:46:59 +02:00
David Vass 9a4e6ef8e4 Show time to charge battery on Mac OS (#46)
* Show time to charge battery on Mac OS

* Rename  variable to
2017-04-20 22:59:10 +02:00
Martin Beentjes 49ff2993be Update README.md
Added Aleksandar Djurdjic to the list of contributors.
2017-01-30 21:14:48 +01:00
Martin Beentjes 06688f8a64 Update README.md
Added the foreground color option
2017-01-30 21:12:11 +01:00
Aleksandar Djurdjic c7034799bc Adapted script files to also print colored fg sequence (#47) 2017-01-30 21:11:00 +01:00
Martin Beentjes f121a2368c Update README.md 2017-01-28 12:32:47 +01:00
Martin Beentjes 0a2d6d02e4 Update README.md
Restructured the README page. The example pictures will be resized to a constant size.
2017-01-28 12:03:50 +01:00
Martin Beentjes a3a955e782 Update README.md
Added a list of the contributors to the README.md
2017-01-02 15:31:09 +01:00
Tom Levens 629902d532 Fix simplified interpolation in bash < 4.0 (#39)
Bash versions < 4.0 do not support associative arrays and MacOS Sierra
still ships with Bash 3.2. This splits the interpolation text and
command into two lists. While this is not as nice, it is supported by
any version of bash.
2016-10-21 11:59:39 +02:00
Tom Levens af7b4be994 Fixed graph when no battery available (#38) 2016-10-21 11:59:32 +02:00
Tom Levens af907c2ceb Added graph formatting option, simplify interpolation (#37)
* Added prefix/suffix scripts and graph using Spark
* Reformatted indents, updated README.md
* Updated variable names & docs
* Change to bash C-style for loop
* Fix spaces to tabs
* Fixed spaces to tabs in battery_graph.sh
* Added missing ""
2016-10-20 00:12:03 +02:00
Martin Beentjes 1df74d095d Update CHANGELOG.md 2016-10-05 11:29:55 +02:00
Joseph fe54f2eb66 Chromebook Support for battery stat (#22)
* chromebook check by /sys/class/chromeos/cros_ecs

By checking the existence of the file `/sys/class/chromeos/cros_ecs` (Chrome OS Embedded Controller), one can determine if the machine is a Chromebook. Every Chromebook using the armv7 and x86 architecture will have this file.
2016-10-05 11:29:04 +02:00
Martin Beentjes 926bfd51fd Update CHANGELOG.md 2016-10-02 17:13:11 +02:00
Evan N-D e70f252bda Fix multi-battery output with upower (#36)
Given multiple batteries in a machine, we will combine the energy and
energy-full values from each battery, then divide the total energy by
the total energy-full, and multiple by 100 to get a percentage. We use
awk to avoid introducing new dependencies, and to also handle the
floating point arithmetic and eventual truncation. This code will always
round your current percentage down.
2016-10-02 17:12:37 +02:00
Martin Beentjes 77760e09af Update README.md 2016-10-01 16:37:28 +02:00
Martin Beentjes 1f7686e0ae Update CHANGELOG.md 2016-10-01 16:14:38 +02:00
Ryan Frantz ce8d85440e Adds support for changing bg color based on battery percentage. (#29)
* Adds support for changing bg color based on battery percentage.

- If #{battery_status_bg} is used, the background of this plugin's status bar will be:
- 'green' for 100% charged
- 'yellow' for 99% to 51% charge
- orange ('colour208') for 50% to 16% charge
- 'red' for 15% to 0% charge

* Adds support for background colors set in user's tmux config.

- The background colors can be configured via 'batt_color_full_charge', 'batt_color_high_charge', 'batt_color_medium_charge', and 'batt_color_low_charge'.
- Sane defaults are provided as well.
2016-10-01 16:12:14 +02:00
Martin Beentjes ae8deefe57 Update README.md 2016-09-28 22:41:23 +02:00
Martin Beentjes d2e7f7bc28 Bump version in CHANGELOG.md 2016-09-24 23:58:16 +02:00
Martin Beentjes beb7940d73 Update CHANGELOG.md 2016-09-24 22:17:05 +02:00
Martin Beentjes 2e99a09d3a Show correct percentage and time for charging/discharging (#35)
This closes #34, closes #25.
2016-09-24 21:48:09 +02:00
Adam Biggs 8ff4bec3d7
Don't modify line endings of screenshot images 2015-12-26 23:39:17 +01:00
Bruno Sutic 41c90a2ac1
Add '.gitattributes' to force proper EOL 2015-10-08 16:38:27 +02:00
Bruno Sutic 811b77ddad
Update plugin installation instructions 2015-08-10 20:40:14 +02:00
Bruno Sutic 7def624f2d
Fix status-right, status-left whitespace issue
Fixes #11
2015-05-23 13:37:32 +02:00
Caleb e9efe36bd1
Adding support for acpi battery status 2015-05-09 22:30:30 +02:00
Bruno Sutic 407d1646fc
Update changelog and readme 2015-03-14 18:33:02 +01:00
Bruno Sutic 45a05289f9
Move battery_status function to helpers file 2015-03-14 18:30:12 +01:00
Bruno Sutic cfd10a2a6c Merge pull request #7 from JanAhrens/master
Display all batteries that upower knows about
2015-03-14 18:29:13 +01:00
Bruno Sutic 3e05bb7edb
battery_remain interpolation displays only time in format \d\d:\d\d
Closes #8
2015-03-14 18:18:35 +01:00
Bruno Sutic e4ed7fa567
Show #{battery_remain} only if battery discharging
Closes #9
2015-03-14 18:03:43 +01:00
Bruno Sutic 93074a2b7d
v1.1.0 2015-03-14 17:40:20 +01:00
Bruno Sutic fbb3575315
Update README and CHANGELOG 2015-03-14 17:39:55 +01:00
Bruno Sutic 7002d871c8 Merge pull request #6 from asethwright/master
Add battery remaining time interpolation
2015-03-14 17:29:08 +01:00
Jan Ahrens 417d20a213 Determine battery icon by examine all batteries
Luckily the alphabetical sort order of all states can also be used to
determine to global system state (attached, charging or fully-charged).
2015-02-21 19:23:38 +01:00
Jan Ahrens 5a91392d2e Display all batteries that upower knows about 2015-02-21 12:33:50 +01:00
Seth Wright 0f8ceaedbd update readme with battery remain info 2015-02-17 13:18:44 -05:00
Seth Wright fd6feb7576 add battery remaining time interpolation 2015-02-17 13:13:57 -05:00
Bruno Sutic 329c7ac37c
Change the default icon for 'attached' battery state 2015-02-06 00:33:48 +01:00
Bruno Sutic afd3e00a91
Update the changelog 2015-02-06 00:32:24 +01:00
Bruno Sutic a5a428fb17 Merge pull request #4 from m1foley/attached-state
Add support for OS X "attached" battery state
2015-02-05 23:38:26 +01:00
Mike Foley 63f99d578e Add support for "attached" battery state
Occurs when Mac cable is partially plugged in.

```
Now drawing from 'AC Power'
 -InternalBattery-0     39%; AC attached; not charging
```
2015-02-03 15:44:12 -08:00
Bruno Sutic d78d51c852
v1.0.0 2014-08-31 01:11:24 +02:00
Bruno Sutic fe38facb74
Mention contributors in the readme 2014-08-31 01:02:39 +02:00
Bruno Sutic 1b42812f7e
Change plugin name to tmux-battery 2014-08-31 01:00:10 +02:00
Bruno Sutic 5e8c671b35
DRYing the code 2014-08-31 00:35:08 +02:00
Bruno Sutic b9d50dd9cb
Refactoring functions to a helper file 2014-08-31 00:31:20 +02:00
Bruno Sutic 1f12b61c6a
Bring back icon defaults for OS X 2014-08-31 00:23:41 +02:00