mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
Update alacritty, kitty, bspwm, i3wm, vim,tmux configs & sctipts
This commit is contained in:
parent
246dc34d13
commit
c7da10d076
22 changed files with 256 additions and 282 deletions
|
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
import requests
|
||||
import os
|
||||
"""For working this script set in ~/.profile 2 variable:
|
||||
"OWM_POLYBAR": API key
|
||||
"OWM_CITY": Your city
|
||||
"""
|
||||
import requests, os
|
||||
|
||||
|
||||
API_KEY = os.getenv("OWM_POLYBAR")
|
||||
|
|
@ -10,5 +11,5 @@ CITY = os.getenv("OWM_CITY")
|
|||
try:
|
||||
JSON = requests.get(f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&lang=EN&&units=metric&appid={API_KEY}").json()
|
||||
print("", int(JSON["main"]["temp"]), "°С")
|
||||
except:
|
||||
except Exception:
|
||||
print(" err °С")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue