aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Turner <gturner@unzane.com>2022-06-18 23:17:25 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2022-06-18 23:17:37 +0300
commit0c197ed4a51e10ed613e48a080f23b1ee7968006 (patch)
tree899e23c71b70a95a13bc8570bc07d2317ca8e4b2
parent0bef490cdaedd992a27a50e14d536c4a795ebc2d (diff)
battery plugin: Support Linux on Librem5 phone
-rw-r--r--internal/p10k.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 01898e1e..1e01ba5f 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1349,7 +1349,7 @@ _p9k_prompt_battery_init() {
return
fi
if [[ $_p9k_os != (Linux|Android) ||
- -z /sys/class/power_supply/(CMB*|BAT*|battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then
+ -z /sys/class/power_supply/(CMB*|BAT*|*battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${:-}'
fi
}
@@ -1407,7 +1407,7 @@ _p9k_prompt_battery_set_args() {
Linux|Android)
# See https://sourceforge.net/projects/acpiclient.
- local -a bats=( /sys/class/power_supply/(CMB*|BAT*|battery)/(FN) )
+ local -a bats=( /sys/class/power_supply/(CMB*|BAT*|*battery)/(FN) )
(( $#bats )) || return
local -i energy_now energy_full power_now