From 1a8734bf461792e9df58a2ec5e3b3085df309ab4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 15:16:02 +1100 Subject: [PATCH 1/4] macOS: Show hyperthreaded cores --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 78661991..3819e310 100755 --- a/neofetch +++ b/neofetch @@ -738,7 +738,7 @@ getcpu() { "Mac OS X") cpu="$(sysctl -n machdep.cpu.brand_string)" - cores="$(sysctl -n hw.physicalcpu)" + cores="$(sysctl -n hw.ncpu)" ;; "iPhone OS") From 5a96327fa3089d0a30130c6696f79df985b4c5a7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 18:35:17 +1100 Subject: [PATCH 2/4] Only use zero width space in image mode --- neofetch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 3819e310..edbb9f9c 100755 --- a/neofetch +++ b/neofetch @@ -1944,7 +1944,7 @@ getcols() { # Add newlines to the string. cols="${cols%%'nl'}" - cols="${cols//nl/\\n${padding}​}" + cols="${cols//nl/\\n${padding}${zws}}" fi } @@ -2141,6 +2141,7 @@ getimage() { return else clear + zws="​ " fi # Get terminal lines and columns @@ -2415,7 +2416,7 @@ info() { [ -z "$2" ] && string="${string/*: }" # Print the string - printf "%b%s\n" "${padding}​${string}${reset} " + printf "%b%s\n" "${padding}${zws}${string}${reset} " # Calculate info height info_height="$((info_height+=1))" @@ -2450,7 +2451,7 @@ prin() { string="$(trim "$string")" # Print the info - printf "%b%s\n" "${padding}​${string}${reset} " + printf "%b%s\n" "${padding}${zws}${string}${reset} " # Calculate info height info_height="$((info_height+=1))" From ad47e456e3f03c541a1043b62011a0923d622004 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 18:36:32 +1100 Subject: [PATCH 3/4] Fix term on solaris --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index edbb9f9c..7241981d 100755 --- a/neofetch +++ b/neofetch @@ -1580,7 +1580,7 @@ getterm() { case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen") getterm "$parent" ;; - "login" | "init") term="$(tty)" ;; + "login"* | "Login"* | "init") term="$(tty)" ;; "ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;; "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;; From e11d40cd0007ceb838232eb0a3ef5c1b7d186544 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Oct 2016 18:37:59 +1100 Subject: [PATCH 4/4] solaris: Fix term --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7241981d..5b9cf92a 100755 --- a/neofetch +++ b/neofetch @@ -1580,7 +1580,7 @@ getterm() { case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen") getterm "$parent" ;; - "login"* | "Login"* | "init") term="$(tty)" ;; + "login"* | *"Login"* | "init") term="$(tty)" ;; "ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;; "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;;