mirror of
https://github.com/tmux-plugins/tmux-cpu.git
synced 2026-09-10 07:16:16 -04:00
rename cpu_load_status => load_status
This commit is contained in:
parent
51a6421f9c
commit
f5494321b4
|
|
@ -20,12 +20,12 @@ get_bg_color_settings() {
|
|||
|
||||
print_bg_color() {
|
||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
||||
local cpu_load_status=$(cpu_load_status $cpu_percentage)
|
||||
if [ $cpu_load_status == "low" ]; then
|
||||
local load_status=$(load_status $cpu_percentage)
|
||||
if [ $load_status == "low" ]; then
|
||||
echo "$cpu_low_bg_color"
|
||||
elif [ $cpu_load_status == "medium" ]; then
|
||||
elif [ $load_status == "medium" ]; then
|
||||
echo "$cpu_medium_bg_color"
|
||||
elif [ $cpu_load_status == "high" ]; then
|
||||
elif [ $load_status == "high" ]; then
|
||||
echo "$cpu_high_bg_color"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ get_fg_color_settings() {
|
|||
|
||||
print_fg_color() {
|
||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
||||
local cpu_load_status=$(cpu_load_status $cpu_percentage)
|
||||
if [ $cpu_load_status == "low" ]; then
|
||||
local load_status=$(load_status $cpu_percentage)
|
||||
if [ $load_status == "low" ]; then
|
||||
echo "$cpu_low_fg_color"
|
||||
elif [ $cpu_load_status == "medium" ]; then
|
||||
elif [ $load_status == "medium" ]; then
|
||||
echo "$cpu_medium_fg_color"
|
||||
elif [ $cpu_load_status == "high" ]; then
|
||||
elif [ $load_status == "high" ]; then
|
||||
echo "$cpu_high_fg_color"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ get_icon_settings() {
|
|||
|
||||
print_icon() {
|
||||
local cpu_percentage=$($CURRENT_DIR/cpu_percentage.sh | sed -e 's/%//')
|
||||
local cpu_load_status=$(cpu_load_status $cpu_percentage)
|
||||
if [ $cpu_load_status == "low" ]; then
|
||||
local load_status=$(load_status $cpu_percentage)
|
||||
if [ $load_status == "low" ]; then
|
||||
echo "$cpu_low_icon"
|
||||
elif [ $cpu_load_status == "medium" ]; then
|
||||
elif [ $load_status == "medium" ]; then
|
||||
echo "$cpu_medium_icon"
|
||||
elif [ $cpu_load_status == "high" ]; then
|
||||
elif [ $load_status == "high" ]; then
|
||||
echo "$cpu_high_icon"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_bg_color_settings() {
|
|||
|
||||
print_bg_color() {
|
||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
||||
local gpu_load_status=$(cpu_load_status $gpu_percentage)
|
||||
local gpu_load_status=$(load_status $gpu_percentage)
|
||||
if [ $gpu_load_status == "low" ]; then
|
||||
echo "$gpu_low_bg_color"
|
||||
elif [ $gpu_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_fg_color_settings() {
|
|||
|
||||
print_fg_color() {
|
||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
||||
local gpu_load_status=$(cpu_load_status $gpu_percentage)
|
||||
local gpu_load_status=$(load_status $gpu_percentage)
|
||||
if [ $gpu_load_status == "low" ]; then
|
||||
echo "$gpu_low_fg_color"
|
||||
elif [ $gpu_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ get_icon_settings() {
|
|||
|
||||
print_icon() {
|
||||
local gpu_percentage=$($CURRENT_DIR/gpu_percentage.sh | sed -e 's/%//')
|
||||
local gpu_load_status=$(cpu_load_status $gpu_percentage)
|
||||
local gpu_load_status=$(load_status $gpu_percentage)
|
||||
if [ $gpu_load_status == "low" ]; then
|
||||
echo "$gpu_low_icon"
|
||||
elif [ $gpu_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_bg_color_settings() {
|
|||
|
||||
print_bg_color() {
|
||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
||||
local gram_load_status=$(cpu_load_status $gram_percentage)
|
||||
local gram_load_status=$(load_status $gram_percentage)
|
||||
if [ $gram_load_status == "low" ]; then
|
||||
echo "$gram_low_bg_color"
|
||||
elif [ $gram_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_fg_color_settings() {
|
|||
|
||||
print_fg_color() {
|
||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
||||
local gram_load_status=$(cpu_load_status $gram_percentage)
|
||||
local gram_load_status=$(load_status $gram_percentage)
|
||||
if [ $gram_load_status == "low" ]; then
|
||||
echo "$gram_low_fg_color"
|
||||
elif [ $gram_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ get_icon_settings() {
|
|||
|
||||
print_icon() {
|
||||
local gram_percentage=$($CURRENT_DIR/gram_percentage.sh | sed -e 's/%//')
|
||||
local gram_load_status=$(cpu_load_status $gram_percentage)
|
||||
local gram_load_status=$(load_status $gram_percentage)
|
||||
if [ $gram_load_status == "low" ]; then
|
||||
echo "$gram_low_icon"
|
||||
elif [ $gram_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ fcomp() {
|
|||
awk -v n1=$1 -v n2=$2 'BEGIN {if (n1<n2) exit 0; exit 1}'
|
||||
}
|
||||
|
||||
cpu_load_status() {
|
||||
load_status() {
|
||||
local percentage=$1
|
||||
if fcomp 80 $percentage; then
|
||||
echo "high"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_bg_color_settings() {
|
|||
|
||||
print_bg_color() {
|
||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
||||
local ram_load_status=$(cpu_load_status $ram_percentage)
|
||||
local ram_load_status=$(load_status $ram_percentage)
|
||||
if [ $ram_load_status == "low" ]; then
|
||||
echo "$ram_low_bg_color"
|
||||
elif [ $ram_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ get_fg_color_settings() {
|
|||
|
||||
print_fg_color() {
|
||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
||||
local ram_load_status=$(cpu_load_status $ram_percentage)
|
||||
local ram_load_status=$(load_status $ram_percentage)
|
||||
if [ $ram_load_status == "low" ]; then
|
||||
echo "$ram_low_fg_color"
|
||||
elif [ $ram_load_status == "medium" ]; then
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ get_icon_settings() {
|
|||
|
||||
print_icon() {
|
||||
local ram_percentage=$($CURRENT_DIR/ram_percentage.sh | sed -e 's/%//')
|
||||
local ram_load_status=$(cpu_load_status $ram_percentage)
|
||||
local ram_load_status=$(load_status $ram_percentage)
|
||||
if [ $ram_load_status == "low" ]; then
|
||||
echo "$ram_low_icon"
|
||||
elif [ $ram_load_status == "medium" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue