1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-12 08:10:07 +00:00

Merge pull request #722 from lemarsu/master

fix: Remove dependency of bc for load widget
This commit is contained in:
Ben Hilburn 2018-01-24 14:09:03 -05:00 committed by GitHub
commit d4a3c045ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -983,9 +983,9 @@ prompt_load() {
# Replace comma # Replace comma
load_avg=${load_avg//,/.} load_avg=${load_avg//,/.}
if [[ "$load_avg" -gt $(bc -l <<< "${cores} * 0.7") ]]; then if [[ "$load_avg" -gt $((${cores} * 0.7)) ]]; then
current_state="critical" current_state="critical"
elif [[ "$load_avg" -gt $(bc -l <<< "${cores} * 0.5") ]]; then elif [[ "$load_avg" -gt $((${cores} * 0.5)) ]]; then
current_state="warning" current_state="warning"
else else
current_state="normal" current_state="normal"