mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-04-24 03:00:16 -04:00
Fix memory size detection on Haiku
This commit is contained in:
@@ -1706,8 +1706,8 @@ detectmem () {
|
||||
usedmem=$((used_mem / 1024))
|
||||
fi
|
||||
elif [ "$distro" == "Haiku" ]; then
|
||||
totalmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f3 | tr -d ' ' | tr -d ')') / 1024^2 ))
|
||||
usedmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f2 | sed 's/max//; s/ //g') / 1024^2 ))
|
||||
totalmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f3 | tr -d ' ' | tr -d ')') / 1024**2 ))
|
||||
usedmem=$(( $(sysinfo -mem | head -n1 | cut -d'/' -f2 | sed 's/max//; s/ //g') / 1024**2 ))
|
||||
else
|
||||
# MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
|
||||
# Source: https://github.com/dylanaraps/neofetch/pull/391/files#diff-e863270127ca6116fd30e708cdc582fc
|
||||
|
||||
Reference in New Issue
Block a user