From 03d61f284dca222d8585368883b36a0296ec1056 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sat, 1 Mar 2025 14:25:32 -0500 Subject: [PATCH] ascii formatting --- driveAtlas.sh | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/driveAtlas.sh b/driveAtlas.sh index 382eb27..4a935ed 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -130,34 +130,43 @@ medium1=''' ''' generate_medium2_layout() { - # Build the drive map first build_drive_map - # USB Section with dynamic mapping - printf " External USB [0b:00.0]\n" + # USB Section with consistent spacing + printf "\n External USB [0b:00.0]\n" printf " ┌────────┐ ┌────────┐\n" printf " │ %-6s │ │ %-6s │\n" "${DRIVE_MAP[usb1]:-EMPTY}" "${DRIVE_MAP[usb2]:-EMPTY}" printf " └────────┘ └────────┘\n\n" - # Rest of chassis layout with enhanced drive info - printf "┌──────────────────────────────────────────────────────────────┐\n" - printf "│ B650D4U3-2Q/BCM │\n" - printf "│ │\n" - printf "│ NVMe [0d:00.0] Bay 11 │\n" - printf "│ ┌────────┐ │\n" - printf "│ │ %-6s │ │\n" "${DRIVE_MAP[11]:-EMPTY}" - printf "│ └────────┘ │\n" - printf "│ │\n" - printf "│ Front Hot-swap Bays [0c:00.0] │\n" - printf "│ ┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐ │\n" + # Main chassis layout with fixed width columns + printf "┌────────────────────────────────────────────────────────────┐\n" + printf "│ B650D4U3-2Q/BCM │\n" + printf "│ │\n" + printf "│ NVMe [0d:00.0] Bay 11 │\n" + printf "│ ┌────────┐ │\n" + printf "│ │ %-6s │ │\n" "${DRIVE_MAP[11]:-EMPTY}" + printf "│ └────────┘ │\n" + printf "│ │\n" + printf "│ Front Hot-swap Bays [0c:00.0] │\n" + printf "│ ┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐ │\n" - for bay in {1..10}; do - printf "│ │%-2d:%-4s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" + # Print first row of bays (1-5) + for bay in {1..5}; do + printf "│ │%-2d:%-4s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" done + printf " │\n" - printf " │\n" - printf "│ └────────┘└────────┘└────────┘└────────┘└────────┘└────────┘└────────┘└────────┘└────────┘└────────┘ │\n" - printf "└──────────────────────────────────────────────────────────────┘\n" + printf "│ └────────┘└────────┘└────────┘└────────┘└────────┘ │\n" + printf "│ ┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐ │\n" + + # Print second row of bays (6-10) + for bay in {6..10}; do + printf "│ │%-2d:%-4s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" + done + printf " │\n" + + printf "│ └────────┘└────────┘└────────┘└────────┘└────────┘ │\n" + printf "└────────────────────────────────────────────────────────────┘\n" } microGeneric='''