mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
rename variable to POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD
Variable now holds an integer, if your battery status is greater or equal to this integer the segment will be hidden
This commit is contained in:
@@ -488,7 +488,7 @@ prompt_battery() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${POWERLEVEL9K_BATTERY_HIDE_FULL}" == "true" && "${bat_percent}" = 100 ]]; then
|
||||
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