Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

c-jaenicke/weather-widget-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

weather-widget

Weather widget for my Polybar setup. It uses the OpenWeatherMap API free tier.

Requires a OpenWeatherMap API Key, insert your key in weather.py: line 6: APIkey = "KEY HERE"

Preview

Small in bar:

Small

Full in terminal:

Full

Usage

weather.py <full/small/help> <location>

help: prints arguments needed
small: only prints current temperature and weather
full: prints full weather report for now and 12 hour forecast

location: the location as one string, if more than one word, separate them with commas

To use it in Polybar you need to make a custom module in your config, check the Polybar wiki on how to do that.

Example Module

[module/weather]
type = custom/script

exec = python <path to script> small <location>

; refresh every 30 minutes
interval = 1800.0

format =<label>
label =%output%

click-right = <Open new instance of your terminal without closing> python <path to script> full <location>

About

Weather Widget for Polybar Setup Written in Python

Resources

Stars

Watchers

Forks

Languages