diff --git a/driveAtlas.sh b/driveAtlas.sh index 4a935ed..7d275e5 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -130,43 +130,34 @@ medium1=''' ''' generate_medium2_layout() { + # Build the drive map first build_drive_map - # USB Section with consistent spacing - printf "\n External USB [0b:00.0]\n" + # USB Section with dynamic mapping + printf " External USB [0b:00.0]\n" printf " ┌────────┐ ┌────────┐\n" printf " │ %-6s │ │ %-6s │\n" "${DRIVE_MAP[usb1]:-EMPTY}" "${DRIVE_MAP[usb2]:-EMPTY}" printf " └────────┘ └────────┘\n\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" + # 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" - # Print first row of bays (1-5) - for bay in {1..5}; do - printf "│ │%-2d:%-4s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" + for bay in {1..10}; do + printf "│ │%-2d:%-4s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" done - 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" + printf " │\n" + printf "│ └─────────┘└─────────┘└─────────┘└─────────┘└─────────┘└────────┘└────────┘└────────┘└────────┘└────────┘ │\n" + printf "└──────────────────────────────────────────────────────────────┘\n" } microGeneric='''