From 242b2bd58958e4e5a6bcf39be11110f5d4019e4d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 5 Dec 2016 10:55:56 +1100 Subject: [PATCH] Memory: [BSD] Remove Free from output --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3cae7094..bfd80a6e 100755 --- a/neofetch +++ b/neofetch @@ -1083,7 +1083,11 @@ get_memory() { # Mem free case "$distro" in "NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;; - "FreeBSD"* | "DragonFly"*) mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')";; + "FreeBSD"* | "DragonFly"*) + mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')" + mem_free="${mem_free/M Free}" + ;; + "OpenBSD"*) ;; *) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;; esac