KittyKatt / screenFetch

Fetches system/theme information in terminal for Linux desktop screenshots.
GNU General Public License v3.0
3.87k stars 454 forks source link

1GB of RAM detected as 1TB on FreeBSD #575

Open cobbleking opened 6 years ago

cobbleking commented 6 years ago

1tb ram

hatsujouki commented 6 years ago

In the original screenfetch-dev, delete before "fi" usedmem=$((usedmem / 1024)) totalmem=$((totalmem / 1024))
and add AFTER "fi" usedmem=$((usedmem/1024)) totalmem=$((totalmem/1024))

darealshinji commented 6 years ago

@wallaor Doesn't adding things after "fi" change the behavior on other OSes?

valpackett commented 5 years ago

At least in the 3.8.0 version that's in ports, replace

totalmem=$(($round_mem / 1024^2 ))

and

usedmem=$(($used_mem / 1024^2 ))

under

elif [[ "$distro" == "FreeBSD"  || "$distro" == "DragonFlyBSD" ]]; then

with

totalmem=$(($round_mem / 1024 / 1024 ))

and

usedmem=$(($used_mem / 1024 / 1024 ))

I think the ^ operator in bash might just be bitwise XOR, not exponentiation :D

UPD: I see this is already fixed in git master, maybe we just need to package that in ports. Are any new numbered releases planned btw?

darealshinji commented 5 years ago

@jhelfman Here's a discussion about a new release: https://github.com/KittyKatt/screenFetch/issues/597 So far @KittyKatt didn't push a new release and I don't want to do that unless he tells me what version string I should use for it.