File tree Expand file tree Collapse file tree 13 files changed +17
-16
lines changed Expand file tree Collapse file tree 13 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_bg_color_settings() {
2020
2121print_bg_color () {
2222 local cpu_percentage=$( $CURRENT_DIR /cpu_percentage.sh | sed -e ' s/%//' )
23- local load_status=$( load_status $cpu_percentage )
23+ local load_status=$( load_status $cpu_percentage " cpu " )
2424 if [ $load_status == " low" ]; then
2525 echo " $cpu_low_bg_color "
2626 elif [ $load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_fg_color_settings() {
2020
2121print_fg_color () {
2222 local cpu_percentage=$( $CURRENT_DIR /cpu_percentage.sh | sed -e ' s/%//' )
23- local load_status=$( load_status $cpu_percentage )
23+ local load_status=$( load_status $cpu_percentage " cpu " )
2424 if [ $load_status == " low" ]; then
2525 echo " $cpu_low_fg_color "
2626 elif [ $load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ get_icon_settings() {
2222
2323print_icon () {
2424 local cpu_percentage=$( $CURRENT_DIR /cpu_percentage.sh | sed -e ' s/%//' )
25- local load_status=$( load_status $cpu_percentage )
25+ local load_status=$( load_status $cpu_percentage " cpu " )
2626 if [ $load_status == " low" ]; then
2727 echo " $cpu_low_icon "
2828 elif [ $load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_bg_color_settings() {
2020
2121print_bg_color () {
2222 local gpu_percentage=$( $CURRENT_DIR /gpu_percentage.sh | sed -e ' s/%//' )
23- local gpu_load_status=$( load_status $gpu_percentage )
23+ local gpu_load_status=$( load_status $gpu_percentage " gpu " )
2424 if [ $gpu_load_status == " low" ]; then
2525 echo " $gpu_low_bg_color "
2626 elif [ $gpu_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_fg_color_settings() {
2020
2121print_fg_color () {
2222 local gpu_percentage=$( $CURRENT_DIR /gpu_percentage.sh | sed -e ' s/%//' )
23- local gpu_load_status=$( load_status $gpu_percentage )
23+ local gpu_load_status=$( load_status $gpu_percentage " gpu " )
2424 if [ $gpu_load_status == " low" ]; then
2525 echo " $gpu_low_fg_color "
2626 elif [ $gpu_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ get_icon_settings() {
2222
2323print_icon () {
2424 local gpu_percentage=$( $CURRENT_DIR /gpu_percentage.sh | sed -e ' s/%//' )
25- local gpu_load_status=$( load_status $gpu_percentage )
25+ local gpu_load_status=$( load_status $gpu_percentage " gpu " )
2626 if [ $gpu_load_status == " low" ]; then
2727 echo " $gpu_low_icon "
2828 elif [ $gpu_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_bg_color_settings() {
2020
2121print_bg_color () {
2222 local gram_percentage=$( $CURRENT_DIR /gram_percentage.sh | sed -e ' s/%//' )
23- local gram_load_status=$( load_status $gram_percentage )
23+ local gram_load_status=$( load_status $gram_percentage " gram " )
2424 if [ $gram_load_status == " low" ]; then
2525 echo " $gram_low_bg_color "
2626 elif [ $gram_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ get_fg_color_settings() {
2020
2121print_fg_color () {
2222 local gram_percentage=$( $CURRENT_DIR /gram_percentage.sh | sed -e ' s/%//' )
23- local gram_load_status=$( load_status $gram_percentage )
23+ local gram_load_status=$( load_status $gram_percentage " gram " )
2424 if [ $gram_load_status == " low" ]; then
2525 echo " $gram_low_fg_color "
2626 elif [ $gram_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ get_icon_settings() {
2222
2323print_icon () {
2424 local gram_percentage=$( $CURRENT_DIR /gram_percentage.sh | sed -e ' s/%//' )
25- local gram_load_status=$( load_status $gram_percentage )
25+ local gram_load_status=$( load_status $gram_percentage " gram " )
2626 if [ $gram_load_status == " low" ]; then
2727 echo " $gram_low_icon "
2828 elif [ $gram_load_status == " medium" ]; then
Original file line number Diff line number Diff line change @@ -47,11 +47,12 @@ fcomp() {
4747
4848load_status () {
4949 local percentage=$1
50- cpu_medium_thresh=$( get_tmux_option " @cpu_medium_thresh" " 30" )
51- cpu_high_thresh=$( get_tmux_option " @cpu_high_thresh" " 80" )
52- if fcomp $cpu_high_thresh $percentage ; then
50+ local prefix=$2
51+ medium_thresh=$( get_tmux_option " @${prefix} _medium_thresh" " 30" )
52+ high_thresh=$( get_tmux_option " @${prefix} _high_thresh" " 80" )
53+ if fcomp $high_thresh $percentage ; then
5354 echo " high"
54- elif fcomp $cpu_medium_thresh $percentage && fcomp $percentage $cpu_high_thresh ; then
55+ elif fcomp $medium_thresh $percentage && fcomp $percentage $high_thresh ; then
5556 echo " medium"
5657 else
5758 echo " low"
You can’t perform that action at this time.
0 commit comments