Closed f1refa11 closed 10 months ago
I was facing some issues with the weather section some days ago and was suggested to create a custom section and make it however you like.
For your specific request, something like this should work:
function custom_weather { return @{ title = "Weather" content =try { (Invoke-RestMethod wttr.in/?format="%c%t+-+%C").Replace("+","") } catch { "$e[91m(Network Error)" } }
Comment out the weather in config file and replace it with this custom function.
You can play around the the format based on these docs.
Some terminals have trouble showing emojis - so we opt for wider compatibility here.
However, as @oneeyedreaper mentioned, you can create a custom weather segment in the config file to show the emojis.
Like: