Dotfiles update 2025-12-25 17:27

This commit is contained in:
Aaron D. Lee
2025-12-25 17:27:58 -05:00
parent 21dff6b1fb
commit dee3ee5b8e

View File

@@ -144,8 +144,8 @@ btrfs-health() {
[[ -z "$errors" ]] && df_print_indent "✓ No errors" || { df_print_indent "✗ Errors detected:"; echo "$errors" | sed 's/^/ /'; ((issues++)); } [[ -z "$errors" ]] && df_print_indent "✓ No errors" || { df_print_indent "✗ Errors detected:"; echo "$errors" | sed 's/^/ /'; ((issues++)); }
echo "" echo ""
df_print_section "Space Allocation" df_print_section "System Space Allocation"
local used_pct=$(sudo btrfs filesystem usage "/" -b 2>/dev/null | grep "Used:" | awk -F"%" '{print $1}' | awk -F"(" '{print $2"%"}' | tail -1) local used_pct=$(sudo btrfs filesystem usage "/" -b 2>/dev/null | grep "Used:" | awk -F"%" '{print $1}' | awk -F"(" '{print $2}' | tail -1)
if [[ -n "$used_pct" ]]; then if [[ -n "$used_pct" ]]; then
(( used_pct >= 90 )) && { df_print_indent "${used_pct}% full - critical!"; ((issues++)); } || \ (( used_pct >= 90 )) && { df_print_indent "${used_pct}% full - critical!"; ((issues++)); } || \
(( used_pct >= 80 )) && df_print_indent "${used_pct}% full" || df_print_indent "${used_pct}% used" (( used_pct >= 80 )) && df_print_indent "${used_pct}% full" || df_print_indent "${used_pct}% used"