Skip to content

A script that fetches the weather from openweathermap API.

Notifications You must be signed in to change notification settings

muurt/weather-polybar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hey there

This is a quick script I made to fetch the weather from openweathermap API.

I made this to work with my polybar setup, here's a preview of how it looks.

preview

Using this

To use this, you'll first need to generate your own API key from openweathermap website. After you generate one, it should look something like this XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, a mix of characters and numbers.

After that, you'll need to change some stuff in the code, as follows.

# The API key that you generated from openmapweather website.
apiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# The city you want to get the weather for.
# I've used my own as an example.
city="manchester"
# The language you want to get the weather in.
# This should be an iso code of the language.
language="en"
# The measurement unit you want to get the weather in.
# This can metric for °C (celsius).
# imperial for °F (fahrenheit).
# and standard for K (kelvin). 
unit="metric"

That's it, the program it self will print the weather which you can then use for your polybar module.

About

A script that fetches the weather from openweathermap API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published