diff --git a/functions/_tide_item_pi_temp.fish b/functions/_tide_item_pi_temp.fish index 2e6b0169..3a47f5cd 100644 --- a/functions/_tide_item_pi_temp.fish +++ b/functions/_tide_item_pi_temp.fish @@ -1,6 +1,15 @@ function _tide_item_pi_temp if type -q vcgencmd vcgencmd measure_temp | string match -qr "(?[\d.]+)" + if test $t -ge 80 + set tide_pi_temp_color $tide_pi_temp_hi_color + else + if test $t -ge 70 + set tide_pi_temp_color $tide_pi_temp_mid_color + else + set tide_pi_temp_color $tide_pi_temp_lo_color + end + end _tide_print_item pi_temp $t' ' $tide_pi_temp_icon end end diff --git a/functions/tide/configure/configs/classic.fish b/functions/tide/configure/configs/classic.fish index cfe5e110..31279b0e 100644 --- a/functions/tide/configure/configs/classic.fish +++ b/functions/tide/configure/configs/classic.fish @@ -64,7 +64,9 @@ tide_os_color EEEEEE tide_php_bg_color 444444 tide_php_color 617CBE tide_pi_temp_bg_color 444444 -tide_pi_temp_color $_tide_color_green +tide_pi_temp_lo_color $_tide_color_dark_green +tide_pi_temp_mid_color $_tide_color_gold +tide_pi_temp_hi_color D70000 tide_private_mode_bg_color 444444 tide_private_mode_color FFFFFF tide_prompt_add_newline_before true diff --git a/functions/tide/configure/configs/classic_16color.fish b/functions/tide/configure/configs/classic_16color.fish index da89d55c..9ef99a05 100644 --- a/functions/tide/configure/configs/classic_16color.fish +++ b/functions/tide/configure/configs/classic_16color.fish @@ -50,7 +50,9 @@ tide_os_color brwhite tide_php_bg_color black tide_php_color blue tide_pi_temp_bg_color black -tide_pi_temp_color green +tide_pi_temp_lo_color green +tide_pi_temp_mid_color yellow +tide_pi_temp_hi_color red tide_private_mode_bg_color black tide_private_mode_color brwhite tide_prompt_color_frame_and_connection brblack diff --git a/functions/tide/configure/configs/lean.fish b/functions/tide/configure/configs/lean.fish index 17f2f949..903d7c39 100644 --- a/functions/tide/configure/configs/lean.fish +++ b/functions/tide/configure/configs/lean.fish @@ -64,7 +64,9 @@ tide_os_color normal tide_php_bg_color normal tide_php_color 617CBE tide_pi_temp_bg_color normal -tide_pi_temp_color $_tide_color_green +tide_pi_temp_lo_color $_tide_color_dark_green +tide_pi_temp_mid_color $_tide_color_gold +tide_pi_temp_hi_color D70000 tide_private_mode_bg_color normal tide_private_mode_color FFFFFF tide_prompt_add_newline_before true diff --git a/functions/tide/configure/configs/lean_16color.fish b/functions/tide/configure/configs/lean_16color.fish index 4f16e5ac..85c88a06 100644 --- a/functions/tide/configure/configs/lean_16color.fish +++ b/functions/tide/configure/configs/lean_16color.fish @@ -50,7 +50,9 @@ tide_os_color brwhite tide_php_bg_color normal tide_php_color blue tide_pi_temp_bg_color normal -tide_pi_temp_color green +tide_pi_temp_lo_color green +tide_pi_temp_mid_color yellow +tide_pi_temp_hi_color red tide_private_mode_bg_color normal tide_private_mode_color brwhite tide_prompt_color_frame_and_connection brblack diff --git a/functions/tide/configure/configs/rainbow.fish b/functions/tide/configure/configs/rainbow.fish index 65497239..a6ebc144 100644 --- a/functions/tide/configure/configs/rainbow.fish +++ b/functions/tide/configure/configs/rainbow.fish @@ -64,7 +64,9 @@ tide_os_color $os_branding_color tide_php_bg_color 617CBE tide_php_color 000000 tide_pi_temp_bg_color 2E3436 -tide_pi_temp_color green +tide_pi_temp_lo_color 4E9A06 +tide_pi_temp_mid_color $_tide_color_gold +tide_pi_temp_hi_color D70000 tide_private_mode_bg_color F1F3F4 tide_private_mode_color 000000 tide_prompt_add_newline_before true diff --git a/functions/tide/configure/configs/rainbow_16color.fish b/functions/tide/configure/configs/rainbow_16color.fish index 84f70a38..3fd9c7f6 100644 --- a/functions/tide/configure/configs/rainbow_16color.fish +++ b/functions/tide/configure/configs/rainbow_16color.fish @@ -50,7 +50,9 @@ tide_os_color black tide_php_bg_color blue tide_php_color black tide_pi_temp_bg_color black -tide_pi_temp_color green +tide_pi_temp_lo_color green +tide_pi_temp_mid_color yellow +tide_pi_temp_hi_color red tide_private_mode_bg_color brwhite tide_private_mode_color black tide_prompt_color_frame_and_connection brblack