aboutsummaryrefslogtreecommitdiffstats
path: root/bin/cache-sample.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-17 12:40:10 +0200
committerDanilo M. <danix@danix.xyz>2026-09-17 12:40:10 +0200
commit32e10b1d6962afd04a209f300ebb8ab9ee29f070 (patch)
tree9b8e711f00b4ebdb3a6652aef4ffc54a1f36b50a /bin/cache-sample.sh
parentf0638bc45a939b28fb32d46e9bbbd8fc2e8cf223 (diff)
downloadconky-theme-udt-32e10b1d6962afd04a209f300ebb8ab9ee29f070.tar.gz
conky-theme-udt-32e10b1d6962afd04a209f300ebb8ab9ee29f070.zip
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.
Diffstat (limited to 'bin/cache-sample.sh')
-rwxr-xr-xbin/cache-sample.sh2
1 files changed, 1 insertions, 1 deletions
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