mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
getdisk: Add Windows support and fix BSD detection
This commit is contained in:
11
fetch
11
fetch
@@ -1009,10 +1009,15 @@ getdisk () {
|
||||
if type -p df >/dev/null 2>&1; then
|
||||
# df flags
|
||||
case "$os" in
|
||||
"Linux") df_flags="-h --total" ;;
|
||||
"Linux" | "Windows") df_flags="-h --total" ;;
|
||||
"Mac OS X") df_flags="-H /" ;;
|
||||
"FreeBSD") df_flags="-h -c" ;;
|
||||
*) disk="Unknown"; return ;;
|
||||
|
||||
*"BSD")
|
||||
case "$os" in
|
||||
"FreeBSD") df_flags="-h -c" ;;
|
||||
*) disk="Unknown"; return ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the disk info
|
||||
|
||||
Reference in New Issue
Block a user