I did it for Termux widget: https://github.com/gardockt/termux-terminal-widget
But you can use it everywhere with bash.
jq bc wego
Create an account and get a free API: https://openweathermap.org/api
Create a file called 'ow_key' nearby the script and place your key in it.
bash widget.sh [LOCATION]
Examle usage:
bash widget.sh Toronto