Nevermind! @spaghetti2514 helped me out with it.

This commit is contained in:
Brett Bohnenkamper
2013-07-01 00:32:51 -05:00
parent 265022740f
commit ea07457bfa

View File

@@ -754,18 +754,18 @@ detectgpu () {
# Disk Usage Detection - Begin
detectdisk () {
diskusage="Unknown"
if [[ "${distro}" != "Mac OS X" ]]; then
if type -p df >/dev/null 2>&1; then
if [[ "${distro}" =~ "(Free|Net|Open|DragonFly)BSD" ]]; then
totaldisk=$(df -h -c | tail -1)
else
totaldisk=$(df -h --total | tail -1)
fi
disktotal=$(awk '{print $2}' <<< "${totaldisk}")
diskused=$(awk '{print $3}' <<< "${totaldisk}")
diskusedper=$(awk '{print $5}' <<< "${totaldisk}")
diskusage="${diskused} / ${disktotal} (${diskusedper})"
if type -p df >/dev/null 2>&1; then
if [[ "${distro}" =~ "(Free|Net|Open|DragonFly)BSD" ]]; then
totaldisk=$(df -h -c | tail -1)
elif [[ "${distro}" == "Mac OS X" ]]; then
totaldisk=$(df -H / | tail -1)
else
totaldisk=$(df -h --total | tail -1)
fi
disktotal=$(awk '{print $2}' <<< "${totaldisk}")
diskused=$(awk '{print $3}' <<< "${totaldisk}")
diskusedper=$(awk '{print $5}' <<< "${totaldisk}")
diskusage="${diskused} / ${disktotal} (${diskusedper})"
fi
[[ "$verbosity" -eq "1" ]] && verboseOut "Finding current GPU...found as '$gpu'"
}
@@ -2911,7 +2911,7 @@ infoDisplay () {
fi
fi
fi
[[ "${distro}" != "Mac OS X" || "${fake_distro}" != "Cygwin" ]] && if [[ "${display[@]}" =~ "disk" ]]; then mydisk=$(echo -e "$labelcolor Disk:$textcolor $diskusage"); out_array=( "${out_array[@]}" "$mydisk" ); ((display_index++)); fi
[[ "${fake_distro}" != "Cygwin" ]] && if [[ "${display[@]}" =~ "disk" ]]; then mydisk=$(echo -e "$labelcolor Disk:$textcolor $diskusage"); out_array=( "${out_array[@]}" "$mydisk" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "cpu" ]]; then mycpu=$(echo -e "$labelcolor CPU:$textcolor $cpu"); out_array=( "${out_array[@]}" "$mycpu" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "gpu" ]]; then mygpu=$(echo -e "$labelcolor GPU:$textcolor $gpu"); out_array=( "${out_array[@]}" "$mygpu" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "mem" ]]; then mymem=$(echo -e "$labelcolor RAM:$textcolor $mem"); out_array=( "${out_array[@]}" "$mymem" ); ((display_index++)); fi