aboutsummaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)AuthorFilesLines
2026-09-17feat: sample the Slackware facts into a cache fileDanilo M.1-0/+47
Conky's Lua has no lfs, so it cannot stat a file, and counting 2800 package files per draw would be a directory walk every two seconds. Writes epochs rather than formatted dates. The shell function this replaces rebuilds a date from ls -l output with the year hardcoded, which breaks every January and on any file older than six months. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17feat: sample the public IP into a cache fileDanilo M.1-0/+48
The draw hook must never make a network call: a hung request blocks the Cairo draw and freezes the dashboard. Thirty minutes, not the old config's five, because a residential address is stable for days. Validates the response before writing. A captive portal and a rate-limit message both arrive with a 200 and would otherwise be drawn as an address. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17fix: stop the widgets from stalling or raising the drawDanilo M.2-2/+2
Memoize hwmon_dir by chip name so sensor reads no longer popen grep on every frame, cache misses included. Floor fractional byte counts in card.human so it cannot raise. Drop the GPU package-temperature row, which duplicated the headline. Set umask before mkdir in both samplers so a fresh cache directory is not world-readable. Make render.lua exit non-zero on a draw error and tolerate an unset HOME.
2026-09-17feat: add the disks and cache samplersDanilo M.2-0/+73
2026-09-17fix: let the shellcheck directive bind to the source lineDanilo M.1-1/+3
`set -a; . "$ENV_FILE"; set +a` on one line meant the `# shellcheck source=/dev/null` above it attached to the `set`, not the `.`, so SC1090 fired anyway. Split across lines, the directive binds and the script lints clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17fix: correct the .cod rationale, and stop world-reading the cacheDanilo M.1-3/+13
The comment claimed a bad key returns HTTP 200 with an error body, so the status code alone proves nothing. Measured against the live API, that is wrong: a bad key returns 401 and an unknown city 404, and with curl -f both fail at curl without the .cod check ever running. The claim came from the polybar script, which ran curl WITHOUT -f and so genuinely did receive error bodies with a success exit. The check was ported but not the reason for it. It still earns its place behind -f, for a 200 whose body is not usable weather, and the comment now says that instead of something false. The spec carried the same wrong sentence and is corrected too. Separately, the cache landed at 644 in a directory where every other generated file is 600, and the response carries the configured city and its coordinates. A umask before the write puts it at 600 without a window where it is briefly readable. The .cod discrepancy was found by the Task 6 implementer, which noticed the bad-key test produced a different message than the plan predicted and said so rather than reporting the expected text as achieved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17feat: add the weather fetch scriptDanilo M.1-0/+55
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>