mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
Fixed long line wraps, rearranged hard disk info
This commit is contained in:
parent
eeacc5cdf5
commit
657173834f
23
inxi
23
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.4.2
|
||||
#### version: 0.4.4
|
||||
#### Date: November 7 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -1661,7 +1661,7 @@ print_gfx_data()
|
|||
print_hard_disk_data()
|
||||
{
|
||||
local hdd_data='' partition_data='' a_partition_working='' hdd_model='' a_hdd_working=''
|
||||
local dev_data='' size_data=''
|
||||
local dev_data='' size_data='' hdd_model_2='' hdd_data_2=''
|
||||
|
||||
if [[ $VERBOSITY_LEVEL -ge 3 ]];then
|
||||
## note: the output part of this should be in the print hdd data function, not here
|
||||
|
@ -1676,16 +1676,29 @@ print_hard_disk_data()
|
|||
dev_data="/dev/${a_hdd_working[0]} - "
|
||||
size_data=" - ${a_hdd_working[1]}"
|
||||
fi
|
||||
hdd_model="${hdd_model}${hdd_model+ ${C1}($(($i+1)))${C2}}$dev_data${a_hdd_working[2]}$size_data"
|
||||
# wrap to avoid long lines
|
||||
if [[ $i -gt 1 && $B_EXTRA_DATA == 'true' ]] || [[ $i -gt 3 ]];then
|
||||
hdd_model_2="${hdd_model_2}${hdd_model_2+${C1}($(($i+1)))${C2}}$dev_data${a_hdd_working[2]}$size_data "
|
||||
else
|
||||
hdd_model="${hdd_model}${hdd_model+ ${C1}($(($i+1)))${C2}}$dev_data${a_hdd_working[2]}$size_data"
|
||||
fi
|
||||
done
|
||||
if [[ -z $hdd_model ]];then
|
||||
hdd_model=' Non Detected'
|
||||
fi
|
||||
hdd_data=$( create_print_line "Disks:" "${C1}HDD${C2}${hdd_model} ${C1}Size${C2} ${hdd_capacity} (${hdd_used})${CN}" )
|
||||
if [[ -n $hdd_model_2 ]];then
|
||||
hdd_data=$( create_print_line "Disks:" "${C1}HDD${C2} ${C1}Total Size:${C2} ${hdd_capacity} (${hdd_used})${hdd_model}" )
|
||||
hdd_data_2=$( create_print_line " " "${hdd_model_2}${CN}" )
|
||||
else
|
||||
hdd_data=$( create_print_line "Disks:" "${C1}HDD${C2} ${C1}Total Size:${C2} ${hdd_capacity} (${hdd_used})${hdd_model}${CN}" )
|
||||
fi
|
||||
else
|
||||
hdd_data=$( create_print_line "Disks:" "${C1}HDD Size${C2} ${hdd_capacity} (${hdd_used})${CN}" )
|
||||
hdd_data=$( create_print_line "Disks:" "${C1}HDD Total Size:${C2} ${hdd_capacity} (${hdd_used})${CN}" )
|
||||
fi
|
||||
print_screen_output "$hdd_data"
|
||||
if [[ -n $hdd_model_2 ]];then
|
||||
print_screen_output "$hdd_data_2"
|
||||
fi
|
||||
|
||||
if [[ $VERBOSITY_LEVEL -ge 4 ]];then
|
||||
# set A_PARTITION_DATA
|
||||
|
|
Loading…
Reference in a new issue