Added wind speed based coloring, and updated debug

This commit is contained in:
koffeejava
2026-03-14 18:12:25 -06:00
parent 39bf1ac5f6
commit eb38201911

View File

@@ -91,13 +91,14 @@ module Wfetch
3 = \"Live Temperature: {temp_c_color}{temp_c}{reset}°C\" 3 = \"Live Temperature: {temp_c_color}{temp_c}{reset}°C\"
4 = \"Feels like: {fl_f_color}{feels_like_f}{reset}°F\" 4 = \"Feels like: {fl_f_color}{feels_like_f}{reset}°F\"
5 = \"Feels like: {fl_c_color}{feels_like_c}{reset}°C\" 5 = \"Feels like: {fl_c_color}{feels_like_c}{reset}°C\"
6 = \"Wind Speed: {wind_mph} MPH\" 6 = \"Wind Speed: {wind_mph_color}{wind_mph}{reset} MPH\"
7 = \"Wind Speed: {wind_kph} KPH\" 7 = \"Wind Speed: {wind_kph_color}{wind_kph}{reset} KPH\"
8 = \"Humidity: {humidity}%\" 8 = \"Humidity: {humidity}%\"
9 = \"Pressure: {pressure_in} IN\" 9 = \"Pressure: {pressure_in} IN\"
10 = \"Pressure: {pressure_mb} MB\" 10 = \"Pressure: {pressure_mb} MB\"
11 = \"Description: {orange}{bold}{description}{reset}\" 11 = \"Description: {orange}{bold}{description}{reset}\"
12 = \"{goodbye}\" 12 = \"{goodbye}\"
") ")
elsif test_config elsif test_config
puts "\nPlease paste the path of the config" puts "\nPlease paste the path of the config"
@@ -158,14 +159,22 @@ module Wfetch
temp_c_color = "\e[0;34m" + bold temp_c_color = "\e[0;34m" + bold
end end
if (26..73).includes?(wind_mph) if wind_mph > 73
wind_mph_color = bold + red wind_mph_color = bold + red
elsif (13..25).includes?(wind_mph) elsif (13..26).includes?(wind_mph)
wind_mph_color = bold + "\e[1;33m" wind_mph_color = bold + "\e[1;33m"
elsif (1..12).includes?(wind_mph) elsif (1..12).includes?(wind_mph)
wind_mph_color = "\e[0;34m" + bold wind_mph_color = "\e[0;34m" + bold
end end
if wind_kph > 46
wind_kph_color = bold + red
elsif (20..45).includes?(wind_mph)
wind_kph_color = bold + "\e[1;33m"
elsif (1..19).includes?(wind_mph)
wind_kph_color = "\e[0;34m" + bold
end
vars = { vars = {
"{temp_f}" => temp_f, "{temp_f}" => temp_f,