neofetch icon indicating copy to clipboard operation
neofetch copied to clipboard

MACos not showing disk

Open idharper opened this issue 1 year ago • 4 comments

Downloaded latest version from brew (7.1.0) onto MacOS 12.6 on Apple M1 Pro Shell is zsh 5.8.1

Disk just showing as /

df -h shows:

Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk3s1s1 926Gi 14Gi 727Gi 2% 502068 4293525466 0% /

Config is the new installed config.

running neofetch -vv shows the following:

  • read -d '' -ra disks ++ df -P -h /
  • unset 'disks[0]'
  • [[ -n /dev/disk3s1s1 926Gi 14Gi 727Gi 2% / ]]
  • for disk in '"${disks[@]}"'
  • IFS=' '
  • read -ra disk_info /opt/homebrew/bin/neofetch: line 3560: disk_info: bad array subscript
  • disk_perc=
  • case $disk_percent in
  • case $df_version in /opt/homebrew/bin/neofetch: line 3573: disk_info: bad array subscript /opt/homebrew/bin/neofetch: line 3573: disk_info: bad array subscript
  • disk=' / '
  • case $disk_subtitle in /opt/homebrew/bin/neofetch: line 3590: disk_info: bad array subscript
  • disk_sub=
  • case $disk_display in
  • [[ -n Disk ]]
  • prin Disk ' / ' ++ trim Disk ++ set -f ++ set -- Disk ++ printf '%s\n' Disk ++ set +f
  • [[ -n Disk ]]
  • [[ -n / ]]
  • [[ -n '' ]]
  • string='Disk: / ' ++ trim 'Disk: / ' ++ set -f ++ set -- Disk: / ++ printf '%s\n' 'Disk: /' ++ set +f
  • string='Disk: /' ++ strip_sequences 'Disk: /' ++ strip='Disk: /' ++ strip='Disk: /' ++ strip='Disk: /' ++ strip='Disk: /' ++ strip='Disk: /' ++ strip='Disk: /' ++ printf '%s\n' 'Disk: /'
  • length='Disk: /'
  • length=7
  • string='Disk\e[0m\e[0m:\e[0m /'
  • string='^[[0m^[[33m\e[1mDisk\e[0m\e[0m:\e[0m /'
  • printf '%b\n' '\e[33C^[[0m^[[33m\e[1mDisk\e[0m\e[0m:\e[0m /\e[0m '
  • (( ++info_height ))
  • prin=1
  • [[ -n 1 ]]
  • return
  • info Battery battery

idharper avatar Sep 27 '22 08:09 idharper

Yea confirm disk space is incorrect (~80G free) OS: macOS 11.7.1 20G918 Disk (/): 14G / 465G (18%)

evrial avatar Nov 18 '22 13:11 evrial

I had the same problem and was able to solve it with using the df command df -h.

Filesystem       Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1s5s1  932Gi  8.3Gi  750Gi     2%  348574 4291701683    0%   /
…
/dev/disk1s1    932Gi  170Gi  750Gi    19% 2935050 7869130440    0%   /System/Volumes/Data
…

Check for the drives you see. For me, the /System/Volumes/Data or /dev/disk1s1 shows the correct values. My disk config looks like this:

disk_show=('/System/Volumes/Data')

The wrong disk is a APFS Startup Snapshot and shows a way too small value for me too.

mikewink avatar Dec 23 '22 20:12 mikewink

I'm having the same issue, but on Catalina, Neofetch version 7.1.0. Uncommenting info "Disk" disk in the config file and typing my single SSD path disk_show=('/System/Volumes/Data') or '/dev/disk1' doesn't work. It just shows up as a slash / on the neofetch...

eclecticpassions avatar Sep 01 '23 09:09 eclecticpassions

I'm having the same issue, but on Catalina, Neofetch version 7.1.0. Uncommenting info "Disk" disk in the config file and typing my single SSD path disk_show=('/System/Volumes/Data') or '/dev/disk1' doesn't work. It just shows up as a slash / on the neofetch...

Found the solution from here #1586. Just brew install bash and now neofetch is showing the correct disk info.

m1do-git avatar Oct 21 '23 02:10 m1do-git