From 50e2d67b7235df4627043554150aabe40c83578a Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Wed, 24 Dec 2025 21:56:30 -0500 Subject: [PATCH] Dotfiles update 2025-12-24 21:56 --- zsh/functions/btrfs-helpers.zsh | 14 +++++++------- zsh/lib/colors.zsh | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/zsh/functions/btrfs-helpers.zsh b/zsh/functions/btrfs-helpers.zsh index 601ba42..abbd1d4 100644 --- a/zsh/functions/btrfs-helpers.zsh +++ b/zsh/functions/btrfs-helpers.zsh @@ -70,7 +70,7 @@ btrfs-subs() { _btrfs_check || return 1 local mount="${1:-$BTRFS_DEFAULT_MOUNT}" - df_print_header "Btrfs Subvolumes" + df_print_func_header "Btrfs Subvolumes" #echo -e "${DF_BLUE}Btrfs Subvolumes" echo "" @@ -131,7 +131,7 @@ btrfs-balance-cancel() { btrfs-scrub() { _btrfs_check || return 1 local mount="${1:-$BTRFS_DEFAULT_MOUNT}" - df_print_header "Btrfs Scrub" + df_print_func_header "Btrfs Scrub" #echo -e "${DF_BLUE}Btrfs Scrub" echo "" @@ -226,7 +226,7 @@ btrfs-compress() { btrfs-info() { _btrfs_check || return 1 local mount="${1:-$BTRFS_DEFAULT_MOUNT}" - df_print_header "Btrfs Filesystem Info" + df_print_func_header "Btrfs Filesystem Info" #echo -e "${DF_BLUE}Btrfs Filesystem Information${DF_NC}" echo -e "\n${DF_CYAN}Filesystem Show:${DF_NC}" @@ -246,7 +246,7 @@ btrfs-health() { _btrfs_check || return 1 local mount="${1:-$BTRFS_DEFAULT_MOUNT}" - df_print_header "Btrfs Health Check" + df_print_func_header "Btrfs Health Check" #echo -e "${DF_BLUE}Btrfs Health Check${DF_NC}" echo "" @@ -319,7 +319,7 @@ btrfs-health() { btrfs-snap-usage() { _btrfs_check || return 1 - df_print_header "Snapshot Disc Usage" + df_print_func_header "Snapshot Disc Usage" #echo -e "${DF_BLUE}Snapshot Space Usage${DF_NC}" echo "" @@ -345,7 +345,7 @@ btrfs-maintain() { _btrfs_check || return 1 local mount="${1:-$BTRFS_DEFAULT_MOUNT}" - df_print_header "script-name" + df_print_func_header "script-name" #echo -e "${DF_BLUE}Btrfs Maintenance Routine${DF_NC}" echo "" echo "This will perform:" @@ -388,7 +388,7 @@ alias btrc='btrfs-compress' # ============================================================================ btrfs-help() { - df_print_header "Btrfs Helper CMD" + df_print_func_header "Btrfs Helper CMD" #echo -e "${DF_BLUE}Btrfs Helper Commands${DF_NC}" cat << 'EOF' diff --git a/zsh/lib/colors.zsh b/zsh/lib/colors.zsh index 42f36ab..85956ad 100644 --- a/zsh/lib/colors.zsh +++ b/zsh/lib/colors.zsh @@ -142,6 +142,31 @@ df_print_header() { echo "" } +df_print_func_header() { + + local func_header_name="${1}" + local datetime=$(date '+%a %b %d %H:%M') + local width=66 + + # Build horizontal line + local hline="" + for ((i=0; i