more padding

This commit is contained in:
2025-03-01 14:33:42 -05:00
parent 6b93173d9b
commit 918536e4df

View File

@ -141,47 +141,42 @@ generate_medium2_layout() {
done done
# Add padding for box borders # Add padding for box borders
box_width=$((max_width + 2)) box_width=$((max_width + 4))
# Create dynamic box borders # Create box drawing elements
box_top=$(printf "┌%${box_width}s┐" | tr ' ' '─') h_line=$(printf '%*s' "$box_width" '' | tr ' ' '─')
box_bottom=$(printf "└%${box_width}s┘" | tr ' ' '─')
# USB Section # USB Section
printf "\n External USB [0b:00.0]\n" printf "\n External USB [0b:00.0]\n"
printf " %s %s\n" "$box_top" "$box_top" printf " %s┐ ┌%s\n" "$h_line" "$h_line"
printf " │ %-${max_width}s │ │ %-${max_width}s │\n" "${DRIVE_MAP[usb1]:-EMPTY}" "${DRIVE_MAP[usb2]:-EMPTY}" printf " │ %-${max_width}s │ │ %-${max_width}s │\n" "${DRIVE_MAP[usb1]:-EMPTY}" "${DRIVE_MAP[usb2]:-EMPTY}"
printf " %s %s\n\n" "$box_bottom" "$box_bottom" printf " %s┘ └%s\n\n" "$h_line" "$h_line"
# Main chassis section # Main chassis section
printf "┌──────────────────────────────────────────────────────────────┐\n" printf "┌──────────────────────────────────────────────────────────────┐\n"
printf "│ B650D4U3-2Q/BCM │\n" printf "│ B650D4U3-2Q/BCM │\n"
printf "│ │\n" printf "│ │\n"
printf "│ NVMe [0d:00.0] Bay 11 │\n" printf "│ NVMe [0d:00.0] Bay 11 │\n"
printf "│ %s │\n" "$box_top" printf "│ %s │\n" "$h_line"
printf "│ │ %-${max_width}s │ │\n" "${DRIVE_MAP[11]:-EMPTY}" printf "│ │ %-${max_width}s │ │\n" "${DRIVE_MAP[11]:-EMPTY}"
printf "│ %s │\n" "$box_bottom" printf "│ %s │\n" "$h_line"
printf "│ │\n" printf "│ │\n"
printf "│ Front Hot-swap Bays [0c:00.0] │\n" printf "│ Front Hot-swap Bays [0c:00.0] │\n"
# Create dynamic box tops for all bays # Create bay rows
printf "│ " printf "│ "
for bay in {1..10}; do for bay in {1..10}; do
printf "%s" "$box_top" printf "%s" "$h_line"
done done
printf " │\n" printf " │\n"
# Create bay labels with drives
printf "│ "
for bay in {1..10}; do for bay in {1..10}; do
printf "│%-2d:%-${max_width}s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}" printf "│%-2d:%-${max_width}s │" "$bay" "${DRIVE_MAP[$bay]:-EMPTY}"
done done
printf " │\n" printf " │\n"
# Create dynamic box bottoms for all bays
printf "│ "
for bay in {1..10}; do for bay in {1..10}; do
printf "%s" "$box_bottom" printf "%s" "$h_line"
done done
printf " │\n" printf " │\n"