From 61577be5ebd1818030a0d61dad0abb07b8656f5d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 15 Oct 2026 12:34:32 +0200 Subject: feat: the updates card moves to the quickshell drawer 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 --- bin/updates-sample.sh | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 bin/updates-sample.sh (limited to 'bin') 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 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" -- cgit v1.2.3