Add conky and gtk theme

This commit is contained in:
2020-08-20 11:03:00 +09:00
parent f6e075d9b5
commit 7846fdae50
657 changed files with 18774 additions and 218 deletions

22
linux/jelly-conky/get_weather Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -eu
# It seems that in conky the execi command will start before curl has completely
# written the file. For some reason adding a sleep before calling curl fixes it.
sleep 2
forecast=~/".cache/jelly-conky/forecast.json"
weather=~/".cache/jelly-conky/weather.json"
mkdir -p ~/".cache/jelly-conky"
api_prefix="api.openweathermap.org/data/2.5/"
appid="APPID=$1"
id="&id=$2"
units="&units=$3"
lang="${4%%_*}"
lang="&lang=$lang"
curl -s "${api_prefix}forecast?${appid}${id}${units}${lang}" -o "$forecast"
curl -s "${api_prefix}weather?${appid}${id}${units}${lang}" -o "$weather"