diff --git a/README.md b/README.md index 0680e06..d3c7019 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ Here are all available options with their default values: @cpu_percentage_format "%3.1f%%" # printf format to use to display percentage -@tmux_cpu_medium_threshold "70" # medium threshold -@tmux_cpu_high_threshold "90" # high threshold +@cpu_medium_thresh "30" # medium percentage threshold +@cpu_high_thresh "80" # high percentage threshold ``` Same options are valid with `@gpu` diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 1c45df8..744ae0e 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -41,11 +41,11 @@ fcomp() { load_status() { local percentage=$1 - tmux_cpu_high_threshold=$(get_tmux_option "@tmux_cpu_high_threshold" "80") - tmux_cpu_medium_threshold=$(get_tmux_option "@tmux_cpu_medium_threshold" "30") - if fcomp $tmux_cpu_high_threshold $percentage; then + cpu_medium_thresh=$(get_tmux_option "@cpu_medium_thresh" "30") + cpu_high_thresh=$(get_tmux_option "@cpu_high_thresh" "80") + if fcomp $cpu_high_thresh $percentage; then echo "high" - elif fcomp $tmux_cpu_medium_threshold $percentage && fcomp $percentage $tmux_cpu_high_threshold; then + elif fcomp $cpu_medium_thresh $percentage && fcomp $percentage $cpu_high_thresh; then echo "medium" else echo "low"