Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi temperature monitor #483

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions functions/_tide_item_pi_temp.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function _tide_item_pi_temp
if type -q vcgencmd
vcgencmd measure_temp | string match -qr "(?<t>[\d.]+)"
if test $t -ge 80
set -fx tide_pi_temp_color $tide_pi_temp_hi_color
else
if test $t -ge 70
set -fx tide_pi_temp_color $tide_pi_temp_mid_color
else
set -fx tide_pi_temp_color $tide_pi_temp_lo_color
end
end
_tide_print_item pi_temp $t' ' $tide_pi_temp_icon
end
end
6 changes: 5 additions & 1 deletion functions/tide/configure/configs/classic.fish
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ tide_os_bg_color 444444
tide_os_color EEEEEE
tide_php_bg_color 444444
tide_php_color 617CBE
tide_pi_temp_bg_color 444444
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
Expand All @@ -81,7 +85,7 @@ tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version
tide_python_bg_color 444444
tide_python_color 00AFAF
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig pi_temp
tide_right_prompt_prefix 
tide_right_prompt_separator_diff_color 
tide_right_prompt_separator_same_color 
Expand Down
4 changes: 4 additions & 0 deletions functions/tide/configure/configs/classic_16color.fish
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ tide_os_bg_color black
tide_os_color brwhite
tide_php_bg_color black
tide_php_color blue
tide_pi_temp_bg_color black
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
Expand Down
6 changes: 5 additions & 1 deletion functions/tide/configure/configs/lean.fish
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ tide_os_bg_color normal
tide_os_color normal
tide_php_bg_color normal
tide_php_color 617CBE
tide_pi_temp_bg_color normal
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
Expand All @@ -81,7 +85,7 @@ tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version
tide_python_bg_color normal
tide_python_color 00AFAF
tide_right_prompt_frame_enabled false
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig pi_temp
tide_right_prompt_prefix ' '
tide_right_prompt_separator_diff_color ' '
tide_right_prompt_separator_same_color ' '
Expand Down
4 changes: 4 additions & 0 deletions functions/tide/configure/configs/lean_16color.fish
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ tide_os_bg_color normal
tide_os_color brwhite
tide_php_bg_color normal
tide_php_color blue
tide_pi_temp_bg_color normal
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
Expand Down
6 changes: 5 additions & 1 deletion functions/tide/configure/configs/rainbow.fish
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ tide_os_bg_color $os_branding_bg_color
tide_os_color $os_branding_color
tide_php_bg_color 617CBE
tide_php_color 000000
tide_pi_temp_bg_color 2E3436
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
Expand All @@ -81,7 +85,7 @@ tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version
tide_python_bg_color 444444
tide_python_color 00AFAF
tide_right_prompt_frame_enabled true
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig pi_temp
tide_right_prompt_prefix 
tide_right_prompt_separator_diff_color 
tide_right_prompt_separator_same_color 
Expand Down
4 changes: 4 additions & 0 deletions functions/tide/configure/configs/rainbow_16color.fish
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ tide_os_bg_color white
tide_os_color black
tide_php_bg_color blue
tide_php_color black
tide_pi_temp_bg_color black
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
Expand Down
1 change: 1 addition & 0 deletions functions/tide/configure/icons.fish
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tide_nix_shell_icon 
tide_node_icon  # Actual nodejs glyph is harder to see
tide_os_icon $os_branding_icon
tide_php_icon 
tide_pi_temp_icon 󰔄
tide_private_mode_icon 󰗹
tide_prompt_icon_connection ' '
tide_pulumi_icon 
Expand Down