diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-15 12:34:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-15 12:34:32 +0200 |
| commit | 61577be5ebd1818030a0d61dad0abb07b8656f5d (patch) | |
| tree | 5d302c636e827b55fc6f33199ed3a8189e532969 /bin | |
| parent | 3943e08dabe684b409a3ac99c9371fbeb5df5cdb (diff) | |
| download | conky-theme-udt-61577be5ebd1818030a0d61dad0abb07b8656f5d.tar.gz conky-theme-udt-61577be5ebd1818030a0d61dad0abb07b8656f5d.zip | |
The card was a copy of nvtable's table, where installed-behind and
repo-behind share a row and are told apart by colour, and it read
"shipped" from the .info rather than the binary repo. The drawer's
updates page replaces it: one row per package under the action it needs
next, Slackware included. Removed: the card, its sampler and the
nvchecker run it started every 30 minutes (the drawer runs nvchecker
when its result is older than that), nvtable_parse with its test and
fixture, and the package-up icon. The card's slot in the layout is left
open; rearranging the board is a separate decision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/updates-sample.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/bin/updates-sample.sh b/bin/updates-sample.sh deleted file mode 100755 index 0c9ee3a..0000000 --- a/bin/updates-sample.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# Sample nvtable's package-update table into a cache file, for -# widgets/updates.lua. Replaces the table the login shell used to print. -# -# nvchecker itself is slow (one network request per stanza), so it is started -# in the background at most every 30 minutes, fully detached: conky's execi -# waits for stdout to close, and a child holding it would stall the dashboard. -# nvtable then reads whatever results the last completed run left, so a fresh -# nvchecker run shows up on the next sample. - -set -u - -CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/udt" -CACHE="$CACHE_DIR/updates.txt" -STAMP="$CACHE_DIR/nvchecker.stamp" -NVCHECK_EVERY=1800 - -# conky launched from the compositor does not inherit the login shell's PATH. -PATH="$HOME/bin:$HOME/.local/bin:$PATH" - -command -v nvtable >/dev/null || { echo "updates-sample: nvtable not found" >&2; exit 1; } - -mkdir -p "$CACHE_DIR" - -if command -v nvchecker >/dev/null; then - last=$(cat "$STAMP" 2>/dev/null || echo 0) - now=$(date +%s) - if (( now - ${last:-0} >= NVCHECK_EVERY )); then - echo "$now" > "$STAMP" - setsid nvchecker </dev/null >/dev/null 2>&1 & - fi -fi - -TMP="$CACHE.tmp.$$" -trap 'rm -f "$TMP"' EXIT - -# -C and -E: plain ASCII, which the widget parses and colours itself. -# Keep the old cache when nvtable fails, rather than replacing it with nothing. -nvtable -C -E > "$TMP" 2>/dev/null && mv -f "$TMP" "$CACHE" |
