From 32e10b1d6962afd04a209f300ebb8ab9ee29f070 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 12:40:10 +0200 Subject: fix: stop the widgets from stalling or raising the draw 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. --- bin/cache-sample.sh | 2 +- bin/disks-sample.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/cache-sample.sh b/bin/cache-sample.sh index cac8911..202bc63 100755 --- a/bin/cache-sample.sh +++ b/bin/cache-sample.sh @@ -11,11 +11,11 @@ CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/udt" CACHE="$CACHE_DIR/cachesize.txt" TARGET="${XDG_CACHE_HOME:-$HOME/.cache}" +umask 077 mkdir -p "$CACHE_DIR" TMP="$CACHE.tmp.$$" trap 'rm -f "$TMP"' EXIT -umask 077 # Total first, then the four largest children. `sort -h` compares human sizes # numerically; the Lua side converts them again because it needs the ratio to diff --git a/bin/disks-sample.sh b/bin/disks-sample.sh index 83b8a62..5291bcf 100755 --- a/bin/disks-sample.sh +++ b/bin/disks-sample.sh @@ -16,11 +16,11 @@ CACHE="$CACHE_DIR/disks.txt" MOUNTS=(/ /home /data /mnt/nfs/Library /mnt/nfs/shared) +umask 077 mkdir -p "$CACHE_DIR" TMP="$CACHE.tmp.$$" trap 'rm -f "$TMP"' EXIT -umask 077 # /usr/bin/df by absolute path with -P -B1, deliberately: # - the user's shell aliases df to `df -h`, and an alias or a function would -- cgit v1.2.3