Skip to content

Instantly share code, notes, and snippets.

@feuerrot
Created October 21, 2014 12:38
Show Gist options
  • Save feuerrot/27dceb1245b9343e11ae to your computer and use it in GitHub Desktop.
Save feuerrot/27dceb1245b9343e11ae to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
import subprocess
reloadtime = 30
args = dict(ac='Aachen',d='Duesseldorf',e='Essen',do='Dortmund')
key = sys.argv[1]
def geturl(city):
return "http://www.yr.no/place/Germany/North_Rhine-Westphalia/{}/meteogram.png".format(args[city])
def gettitle(city):
return "yrno"
file = subprocess.Popen(['feh', '--title', gettitle(key), '--reload', str(reloadtime), geturl(key)])
file.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment