diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-13 11:35:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-13 11:35:00 +0200 |
| commit | 3943e08dabe684b409a3ac99c9371fbeb5df5cdb (patch) | |
| tree | 7dcedbb2d64a04e59ab239a8c40c04f0f0cf29aa /bin/disks-sample.sh | |
| parent | b2fe3f493efc12dd300f0e2b2ede5660ee70c193 (diff) | |
| download | conky-theme-udt-3943e08dabe684b409a3ac99c9371fbeb5df5cdb.tar.gz conky-theme-udt-3943e08dabe684b409a3ac99c9371fbeb5df5cdb.zip | |
The quickshell island's performance panel now shows CPU, RAM,
temperatures, the GPU, disks and network, and warns from the status
pill when something runs hot, fills up, or the public IP drifts from
the pinned one. Two dashboards drawing the same numbers would drift
apart, so the four widgets go, with the disks and public IP samplers.
The island keeps writing ~/.cache/udt/pubip.txt in the same format.
The freed space is left empty for the user to rearrange.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/disks-sample.sh')
| -rwxr-xr-x | bin/disks-sample.sh | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/bin/disks-sample.sh b/bin/disks-sample.sh deleted file mode 100755 index 5291bcf..0000000 --- a/bin/disks-sample.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# Sample filesystem usage into a cache file, for widgets/disks.lua. -# -# This exists so the draw hook never calls statfs on an NFS path. An -# unreachable server blocks that call, and blocking the Cairo draw freezes the -# whole dashboard; here it costs a stale cache and nothing else. -# -# One NFS mount per server: Library and Slackware are the same export on one -# server, shared and backup_danix the same on another, so showing all four -# printed every number twice. - -set -u - -CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/udt" -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 - -# /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 -# hand the parser '1.6G' where it expects an integer -# - -P is the POSIX format, one line per filesystem, mountpoint last -# - -B1 is bytes, so the widget does the formatting and the parser never -# has to interpret a suffix -if ! /usr/bin/df -P -B1 "${MOUNTS[@]}" > "$TMP" 2>/dev/null; then - # A single unreachable mount must not discard the others: df still reports - # the ones it could stat, so keep the output if it has any data rows. - if [ "$(wc -l < "$TMP")" -lt 2 ]; then - echo "disks-sample: df produced nothing usable" >&2 - exit 1 - fi -fi - -mv -f "$TMP" "$CACHE" |
