mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-10-04 18:46:21 +00:00
add comment line above battery-threshold condition
This commit is contained in:
1 parent
238b231c3e
commit
7ab9cb150e
1 file changed
+1
-1
@@ -487,7 +487,7 @@ prompt_battery() {
|
||||
[[ "${(t)POWERLEVEL9K_BATTERY_STAGES}" =~ "array" ]] && POWERLEVEL9K_BATTERY_ICON="$POWERLEVEL9K_BATTERY_STAGES[$offset]" || POWERLEVEL9K_BATTERY_ICON=${POWERLEVEL9K_BATTERY_STAGES:$offset:1}
|
||||
fi
|
||||
fi
|
||||
|
||||
# return if POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD is set and the battery percentage is greater or equal
|
||||
if [[ -v "POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD" && "${bat_percent}" -ge $POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user