Disk: Use -P for all OS
This commit is contained in:
parent
868d8c2d8e
commit
91143de1a5
1 changed files with 1 additions and 8 deletions
9
neofetch
9
neofetch
|
@ -1539,15 +1539,8 @@ get_term_font() {
|
||||||
get_disk() {
|
get_disk() {
|
||||||
type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
|
type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
|
||||||
|
|
||||||
# Split the info
|
|
||||||
case "$os" in
|
|
||||||
"Haiku") return ;;
|
|
||||||
"Mac OS X") df_flags=(-P -h /) ;;
|
|
||||||
*) df_flags=(-h /) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Get the info for /
|
# Get the info for /
|
||||||
disks=($(df "${df_flags[@]}")) || { err "Disk: 'df' exited with error code 1"; return; }
|
disks=($(df -P -h /)) || { err "Disk: 'df' exited with error code 1"; return; }
|
||||||
|
|
||||||
disk_used="${disks[9]}"
|
disk_used="${disks[9]}"
|
||||||
disk_total="${disks[8]}"
|
disk_total="${disks[8]}"
|
||||||
|
|
Loading…
Reference in a new issue