diff --git a/neofetch b/neofetch index 2100e0c1..c80afff5 100755 --- a/neofetch +++ b/neofetch @@ -1505,14 +1505,18 @@ getdisk () { # Add info bar disk_used=${disk_used/G} - disk_used=${disk_used/T} disk_total=${disk_total/G} - disk_total=${disk_total/T} + + [[ "$disk_used" == *"T" ]] && \ + disk_used=$(printf "%s\n" "${disk_used/T} * 1000" | bc) + + [[ "$disk_total" == *"T" ]] && \ + disk_total=$(printf "%s\n" "${disk_total/T} * 1000" | bc) case "$disk_display" in - "bar") disk="$(bar "${disk_used/'.'}" "${disk_total/'.'}")" ;; - "infobar") disk+=" $(bar "${disk_used/'.'}" "${disk_total/'.'}")" ;; - "barinfo") disk="$(bar "${disk_used/'.'}" "${disk_total/'.'}") $disk" ;; + "bar") disk="$(bar "${disk_used/'.'*}" "${disk_total/'.'*}")" ;; + "infobar") disk+=" $(bar "${disk_used/'.'*}" "${disk_total/'.'*}")" ;; + "barinfo") disk="$(bar "${disk_used/'.'*}" "${disk_total/'.'*}") $disk" ;; esac }