From 3a41060c103250e56f2c6430b41fb7f3c47316a4 Mon Sep 17 00:00:00 2001 From: John Bertagnolli Date: Fri, 20 May 2016 19:16:53 -0600 Subject: [PATCH 1/2] Add support for fish shell version. --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 15d4ee14..851f428d 100755 --- a/neofetch +++ b/neofetch @@ -770,6 +770,10 @@ getshell () { shell=${shell/tcsh} shell=${shell/\(*} ;; + + *"fish"*) + shell+="$("$SHELL" -c 'printf "%s" "$FISH_VERSION"')" + ;; esac shell="${shell/\(*\)}" From fdf299ee012157f089b7be75caf066bf135f4b0c Mon Sep 17 00:00:00 2001 From: John Bertagnolli Date: Fri, 20 May 2016 20:27:27 -0600 Subject: [PATCH 2/2] Set bc scale for memory calculation. If $HOME/.bcrc has the scale option set (scale = 8), the memory calculation will result in a string like "16384.00000000MB". This fix should result that by setting the scale to 0. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 851f428d..e05b6258 100755 --- a/neofetch +++ b/neofetch @@ -1408,7 +1408,7 @@ getmemory () { ;; "Mac OS X" | "iPhone OS") - memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) + memtotal=$(printf "scale=0; %s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) memwired=$(vm_stat | awk '/wired/ { print $4 }') memactive=$(vm_stat | awk '/active / { printf $3 }') memcompressed=$(vm_stat | awk '/occupied/ { printf $5 }')