diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 09:07:59 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 09:07:59 +0200 |
| commit | 2218d1afe5750558f222c048525cb32f8781c260 (patch) | |
| tree | 7bd60102a2dedbae1ebce2b8088bf2644e2009af /weather.env.example | |
| parent | 53d39b7212ffe0753d2b10ea39348bc033f06bef (diff) | |
| download | conky-theme-udt-2218d1afe5750558f222c048525cb32f8781c260.tar.gz conky-theme-udt-2218d1afe5750558f222c048525cb32f8781c260.zip | |
feat: add the weather fetch script
Fetches current weather from OpenWeatherMap into a cache file, meant
to run from conky's ${execi 900 ...}. Writes to a temp file in the
same directory as the target and renames atomically, so a killed or
failed fetch never leaves the widget reading a half-written or error
response. Distinguishes HTTP failure from a 200-with-error-body (a
bad key returns the latter for some endpoints, the former here), and
leaves any existing good cache untouched on either kind of failure.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'weather.env.example')
| -rw-r--r-- | weather.env.example | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/weather.env.example b/weather.env.example new file mode 100644 index 0000000..fa30879 --- /dev/null +++ b/weather.env.example @@ -0,0 +1,12 @@ +# Copy to ~/.config/udt/weather.env and fill in. That path is outside this +# repo on purpose: it holds a key, and anything committed is potentially +# public. chmod 600 it. +# +# Get a key at https://openweathermap.org/api. A new key returns +# "401 Invalid API key" for minutes to hours after creation; that is the API +# activating it, not a mistake in this file. + +KEY=your_32_character_api_key_here +CITY=Your City +COUNTRY=XX +UNITS=metric |
