lptstr / winfetch

🛠 A command-line system information utility written in PowerShell. Like Neofetch, but for Windows.
MIT License
1.35k stars 76 forks source link

Weather - Show Emojis #199

Closed f1refa11 closed 10 months ago

f1refa11 commented 11 months ago

Like:

Weather:🌥18°C - Partly cloudy
oneeyedreaper commented 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.

rashil2000 commented 10 months ago

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.