dracula / tmux

🧛🏻‍♂️ Dark theme for tmux
https://draculatheme.com/tmux
MIT License
664 stars 311 forks source link

weather.sh: added timeouts & checking for 'wttr.in' #287

Closed ikubetoomuzik closed 2 months ago

ikubetoomuzik commented 2 months ago

This is a follow on to my previous request that changed how status was checked for the weather sites. This edit is still using BASH's builtin TCP connections for testing. Added the timeout command so that the status bar doesn't have "NOT READY". Also added a check for 'wttr.in' port 443 as that site is used to get the actual weather information.

I also changed the displayed message when either site is unavailable from "Location Unavailable" to "Weather Unavailable" as it could be either 'wttr.in' or 'ipinfo.io' that is down and causing the error.

ethancedwards8 commented 2 months ago

Oh yeah good point. I had not considered that. Thank you.