mirror of
https://github.com/tmux-plugins/tmux-battery.git
synced 2026-09-10 07:26:19 -04:00
fix(battery-remain): fix with acpi and @batt_remain_short option (#112)
This commit is contained in:
parent
5c52d4f7f8
commit
48fae59ba4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.swp
|
||||
|
|
@ -106,7 +106,11 @@ upower_battery_remaining_time() {
|
|||
}
|
||||
|
||||
acpi_battery_remaining_time() {
|
||||
acpi -b | grep -m 1 -Eo "[0-9]+:[0-9]+:[0-9]+"
|
||||
regex="[0-9]+:[0-9]+"
|
||||
if ! $short; then
|
||||
regex="$regex:[0-9]+"
|
||||
fi
|
||||
acpi -b | grep -m 1 -Eo "$regex"
|
||||
}
|
||||
|
||||
print_battery_remain() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue