mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-25 20:40:24 +10:00
Adding a conky
This commit is contained in:
24
.config/conky/qtile/Mimosa/scripts/weather-v2.0.sh
Executable file
24
.config/conky/qtile/Mimosa/scripts/weather-v2.0.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# v2.0 Closebox73
|
||||
# This script is to get weather data from openweathermap.com in the form of a json file
|
||||
# so that conky will still display the weather when offline even though it doesn't up to date
|
||||
|
||||
# Variables
|
||||
# get your city id at https://openweathermap.org/find and replace
|
||||
city_id=4887398
|
||||
|
||||
# you can use this or replace with yours
|
||||
api_key=e46d6b1c945f2e9983f0735f8928ea2f
|
||||
|
||||
# choose between metric for Celcius or imperial for fahrenheit
|
||||
unit=imperial
|
||||
|
||||
# i'm not sure it will support all languange,
|
||||
lang=en
|
||||
|
||||
# Main command
|
||||
url="api.openweathermap.org/data/2.5/weather?id=${city_id}&appid=${api_key}&cnt=5&units=${unit}&lang=${lang}"
|
||||
curl ${url} -s -o ~/.cache/weather.json
|
||||
|
||||
exit
|
||||
Reference in New Issue
Block a user