fix(sketchybar): show disk used% instead of free%
All checks were successful
CI / check (push) Successful in 3m27s

Inverts the df output to show percentage used, matching the other
resource monitors (CPU, memory).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-26 16:20:31 -08:00
parent baf64f7f4a
commit 63c3f4e84d

View File

@@ -632,7 +632,8 @@ in
text = '' text = ''
#!/bin/bash #!/bin/bash
DISK_USAGE=$(df -H / | grep -v Filesystem | awk '{print $5}') # df $5 can show free% on some APFS setups; calculate used% explicitly
DISK_USAGE=$(df -H / | grep -v Filesystem | awk '{gsub(/%/,"",$5); printf "%.0f%%", 100-$5}')
${pkgs.sketchybar}/bin/sketchybar --set $NAME label="$DISK_USAGE" ${pkgs.sketchybar}/bin/sketchybar --set $NAME label="$DISK_USAGE"
''; '';