aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/Weather.py
Commit message (Collapse)AuthorAgeLines
* Invalidate cache when changing unitsDon Williams2025-12-06-0/+7
| | | | | | | | On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: Weather.py
* Merge pull request #874 from albersonmiranda/weather-fixDonald Williams2025-12-05-5/+5
|\ | | | | fix: Check for empty strings in place parts and prevent coordinates from printing when a place is found.
| * fix: Check for empty strings in place parts and prevent coordinates from ↵Alberson Miranda2025-12-05-5/+5
| | | | | | | | printing when a place is found.
* | fix: Weather.py one-off runbrockar2025-11-09-1/+1
|/
* feat(weather): prioritize MANUAL_PLACE for geocoding and skip reverse lookup ↵prabinpanta02025-10-28-8/+16
| | | | | | | | | when set - Treat MANUAL_PLACE as highest priority: forward-geocode it first and return coords if found - Make ENV_PLACE a separate forward-geocode step (after explicit env coords) - When fetching fresh weather, use MANUAL_PLACE directly as the place string to avoid an unnecessary reverse geocode call - Update comment numbering to reflect the new priority order
* feat(weather): forward geocode MANUAL_PLACE/WEATHER_PLACE to lat/lonprabinpanta02025-10-28-7/+50
| | | | | | | - Add Open‑Meteo geocoding for place names; use when env coords aren’t set - Adjust get_coords precedence: env coords > manual/env place > cache > IP - Guard cache reuse by verifying cached forecast lat/lon matches requested - Preserve tooltip place display; no changes to JSON schema/output fields
* config(hypr): preserve valid zero values for is_day and weather_code by ↵prabinpanta02025-10-27-2/+4
| | | | using explicit None checks
* config(hypr): preserve fetched/cached place and stop preemptive MANUAL/ENV ↵prabinpanta02025-10-27-7/+5
| | | | | | override Use the exact place value returned from fetch_place or stored in the API cache when writing/reading and when building output. Remove the early coalescing with MANUAL_PLACE/ENV_PLACE so cached/fetched place strings (including empty/None) are preserved and final selection is handled centrally by build_place_str.
* Update config/hypr/UserScripts/Weather.pyPrabin Panta2025-10-27-1/+1
| | | Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* config(hypr): preserve empty place strings & prefer MANUAL/ENV place; use ↵prabinpanta02025-10-27-8/+9
| | | | | | | | | explicit None checks - Use explicit "is not None" checks when building place parts so empty strings are kept instead of being treated as falsy. - Build place string from MANUAL_PLACE or ENV_PLACE before reverse-geocoded place, preserving explicit overrides and empty place values.
* config(hypr): skip empty place parts and simplify place selection using ↵prabinpanta02025-10-27-6/+6
| | | | | | | | or-chaining Use truthy checks when building Open-Meteo place parts (ignore empty strings) and replace verbose None-check ternaries with `or` chains when resolving the effective place (prefer MANUAL_PLACE, then ENV_PLACE, then cached/fetched place).
* config(hypr): preserve empty place strings and use explicit None checksprabinpanta02025-10-27-6/+7
| | | | | | | Use `is not None` when extracting open-meteo place parts so empty strings aren't discarded. Replace truthy `or` chains for selecting the effective place with explicit None-aware conditionals so MANUAL_PLACE/ENV_PLACE empty values are honored instead of being treated as false.
* config(hypr): run Weather.sh at startup; lower weather cache TTL to 5 minutesprabinpanta02025-10-27-1/+1
|
* config(hypr): disable tooltip markup by default, refine place handling & ↵prabinpanta02025-10-27-11/+17
| | | | | | | | | | simple output; replace wttr wrapper - Set TOOLTIP_MARKUP default to off (ENV-driven still supported). - Use truthy checks in place extraction helpers and simplify extraction logic. - Change place formatting to show resolved place with coordinates or coordinates-only. - Prepend place to simple text cache and add icons for wind, humidity and visibility. - Replace legacy wttr-based Weather.sh with a direct Python Weather.py invocation.
* config(hypr): relax out_data typing in Weather.py to Dict[str, Any]prabinpanta02025-10-26-1/+1
| | | | | | Change out_data annotation from Dict[str, str] to Dict[str, Any] so the output can include non-string values (tooltip, class, etc.) and avoid type mismatches.
* config(hypr): improve numeric coercion and add ensure_* warningsprabinpanta02025-10-26-2/+12
| | | | | | | | | - Parse numeric strings more robustly in coerce_number: convert to float then return int when the float has no fractional part (handles scientific notation and avoids brittle '.'/'e' checks). - Add diagnostic warnings to ensure_dict and ensure_list that print the unexpected type and a truncated repr to stderr to help detect API shape mismatches.
* config(hypr): refactor Weather.py — pathlib, typing, safer parsing & ↵prabinpanta02025-10-26-178/+500
| | | | | | | | | | | | | modular flow - Convert to dataclasses (Location, WeatherData) and add richer typing/casts - Replace os.path with pathlib for cache paths and file I/O - Add robust numeric coercion helpers (coerce_int/float/number) and unit-safe parsing - Introduce ensure_dict/ensure_list and improved safe_get for resilient JSON traversal - Split geolocation into env/cache/ip providers and modular reverse-geocoding helpers - Modularize cache/fetch logic (try_cached, fetch_fresh, try_stale) and unify output builder - Safer handling of API cache timestamp/TTL and stale-cache fallback - Add simple tests for coercion functions
* Updated Weather.py to correct versionDon Williams2025-10-05-107/+504
| | | | | | | | On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/UserScripts/Weather.py
* Update Weather.py - index out of rangeDonald Williams2025-09-21-1/+2
| | | | Changed index to resolve "index out of range error" Fix provided by mio-dokuhaki tested and verified
* Update Weather.pyDaniel Walker2025-05-01-1/+1
| | | fix wind speed display
* bug fix for Weather.pymio-dokuhaki2025-04-05-5/+7
|
* nope..installer2025-02-23-1/+1
| | | | these 2 does not like $HOME
* Not sure if important.. but whateverJaKooLit2025-02-23-1/+1
|
* Update Weather.pyJa.KooLit2025-02-22-9/+20
| | | just added the manual addition of location in case user wants that
* Weather.py update, auto get locationbrockar2025-02-21-33/+28
| | | | | I just can test it on my location, so I need that be tested before merging :)
* Some formatting, header adjustments on conf and scriptsJaKooLit2024-09-20-1/+0
|
* Added Searchable Keybinds using rofiJaKooLit2024-09-20-0/+3
| | | | Default Keybind SUPER SHIFT K
* fix: fix bug on Weather.py reversing min/max tempalzalia12024-07-11-2/+2
|
* reduced padding rofi on master configJaKooLit2024-05-22-1/+1
| | | | added a space on weather.py waybar data for better output
* Fixed alignment of Weather.py for hyprlock - Man this is getting annoying ↵JaKooLit2024-05-15-1/+1
| | | | already lmao
* updated weather iconsJaKooLit2024-05-15-6/+6
|
* Weather.py clean up. Double codesJaKooLit2024-05-12-141/+6
|
* weather.py alignment adjustmentJaKooLit2024-05-10-0/+135
|
* Initial Push - Moving to Wallust from PywalJaKooLit2024-05-10-3/+3
|
* Hyprlock weather delay fixKiran George2024-05-06-1/+13
|
* updated Weather.pyJaKooLit2024-05-03-0/+0
|
* updated python weather scriptJaKooLit2024-05-03-3/+5
|
* to resolve the conflict or PR #152JaKooLit2024-05-03-102/+102
|
* removal of extra # to align with new hyprlang requirement. Credit goes to ↵Ja.KooLit2024-03-13-1/+1
| | | | @@Ryuuyas
* Re-Structured Hypr Folder in preparation for Updates ScriptsJa.KooLit2023-12-29-0/+122
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage