Skip to content

Commit 4383265

Browse files
Release v2.0.0 (#121)
1 parent 5c47191 commit 4383265

5 files changed

Lines changed: 24 additions & 118 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# Changelog
22

3-
### master
4-
- Fixed `#{battery_graph}` to actually display graph (@rux616)
5-
- High-granularity icons and colors added. (@rux616)
6-
- Changed preferred order of utility applications to be `pmset` -> `acpi` -> `upower` -> `termux-battery-status` due to CPU usage issues with `upower` (2019-03-05) (@rux616)
7-
- Added `#{battery_status_bg}` feature (@RyanFrantz)
8-
- Added multibattery output support for `upower` (@futuro)
9-
- Added Chromebook support (@forkjoseph)
10-
- Added battery graph, simplify interpolation (@levens)
3+
### v2.0.0, 2025-12-30
4+
- Added `#{battery_charging_watts}` format string for displaying current watts supplied on macOS
5+
- Added `#{battery_color_bg}`, `#{battery_color_fg}` format strings for dynamic color based on charge/status
6+
- Added `#{battery_color_charge_bg}`, `#{battery_color_charge_fg}` for colors based solely on charge level
7+
- Added `#{battery_color_status_bg}`, `#{battery_color_status_fg}` for colors based solely on battery status
8+
- Added `#{battery_icon_charge}`, `#{battery_icon_status}` for granular icon control
9+
- Added 8-tier charge level icons and colors with full customization support
10+
- Added `#{battery_graph}` to display battery as a bar graph
11+
- Added `@batt_remain_short` option to shorten remaining time display
12+
- Added WSL (Windows Subsystem for Linux) support
13+
- Added OpenBSD `apm` support
14+
- Added `battery_enabled.tmux` script for conditionally showing battery
15+
- Fixed battery graph display
16+
- Removed deprecated `#{battery_status_bg}` and `#{battery_status_fg}` format strings
17+
- Changed preferred order of utility applications to: pmset → acpi → upower → termux-battery-status due to CPU usage issues with upower
1118

1219
### v1.2.0, 2016-09-24
1320
- show output for `#{battery_remain}` interpolation only if the battery is

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If format strings are added to `status-right`, they should now be visible.
5252
Add any of the supported format strings (see below) to the `status-right` tmux option in `.tmux.conf`. Example:
5353

5454
```tmux
55-
set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M '
55+
set -g status-right '#{battery_color_bg} Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M '
5656
```
5757

5858
### Supported Format Strings
@@ -69,7 +69,7 @@ set -g status-right '#{battery_status_bg} Batt: #{battery_icon} #{battery_percen
6969
- `#{battery_icon_status}` - will display a battery status icon
7070
- `#{battery_percentage}` - will show battery percentage
7171
- `#{battery_remain}` - will show remaining time of battery charge\*
72-
= `#{battery_charging_watts}` - will display the current watts supplied (currently supported only on OSX)
72+
- `#{battery_charging_watts}` - will display the current watts supplied (currently supported only on macOS)
7373

7474
\* These format strings can be further customized via options as described below.
7575

scripts/battery_charging_watts.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44

55
source "$CURRENT_DIR/helpers.sh"
66

7-
print_battery_percentage() {
7+
print_battery_charging_watts() {
88
if is_osx; then
99
watts=$(system_profiler SPPowerDataType | grep Wattage | awk '{print $3}')
10-
if [ -z $watts];
11-
then
12-
watts="0"
10+
if [ -z "$watts" ]; then
11+
watts="0"
1312
fi
14-
echo "$watts"
15-
else
16-
echo "??"
13+
echo "${watts}W"
14+
else
15+
echo ""
1716
fi
1817
}
1918

2019
main() {
21-
print_battery_percentage
20+
print_battery_charging_watts
2221
}
2322
main

scripts/battery_status_bg.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

scripts/battery_status_fg.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)