push all the updates

This commit is contained in:
2026-04-15 20:27:52 +02:00
parent 0936134f92
commit feca201858
9 changed files with 636 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/bash
# Usage: check-mount.sh <mountpoint> <label>
# Outputs Waybar custom module JSON
MOUNT="$1"
LABEL="$2"
ICON_MOUNT="󰋊"
ICON_DOWN=""
if mountpoint -q "$MOUNT"; then
read -r used avail pcent <<< "$(df -h --output=used,avail,pcent "$MOUNT" | tail -1)"
printf '{"text": "%s %s %s/%s (%s)", "tooltip": "%s mounted — used: %s, free: %s (%s)", "class": "mounted"}\n' \
"$ICON_MOUNT" "$LABEL" "$used" "$avail" "$pcent" "$MOUNT" "$used" "$avail" "$pcent"
else
printf '{"text": "%s %s N/A", "tooltip": "%s is NOT mounted", "class": "unmounted"}\n' "$ICON_DOWN" "$LABEL" "$MOUNT"
fi