Skip to content

Hskl14/polybar-weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

polybar-weather

Display weather status in polybar.

Dependecies

  • Python3

Settings

[module/weather]
type = custom/script
exec = python ~/path/to/polybarWeather.py -i 745042 -a appid123goes456here789 -t Celcius

Usage

Here is the parameters.

-i CityId -a AppID -t OutputType -z ZipCode -c CountryCode

Getting Started

First of all, Application ID is needed; You can get your individual AppID by signing up to openweathermap and going to the API section: https://home.openweathermap.org/users/sign_up

Getting Status

There are two ways to get weather status: using cityID or using both ZipCode and CountryCode. ApplicationID is needed for each way. Here is example for each ways:

python ~/path/to/polybarWeather.py -i 745042 -a appid123goes456here789

In the example above, 745042 is the city id of Istanbul, below there is an information on getting your city's id. And the output will be:

rain 8°C

Celcius is the default output type, you can change it to Fahrenheit or Kelvin.

python ~/path/to/polybarWeather.py -z 34704 -c tr -a appid123goes456here789 -t Fahrenheit
Finding City ID

Information on supported cities are given in a json format with the name 'city.list.json.gz' and can be downloaded from: http://bulk.openweathermap.org/sample/

About

Display weather status in polybar.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages