From 42bed8b60e49246c355a09c87f9faffb088ebde5 Mon Sep 17 00:00:00 2001 From: Mitch Weaver <20451170+MitchWeaver@users.noreply.github.com> Date: Sun, 28 Jul 2019 07:48:55 -0500 Subject: [PATCH 01/10] add bonsai linux support add packages support --- neofetch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/neofetch b/neofetch index 357f0fce..ff5b1bee 100755 --- a/neofetch +++ b/neofetch @@ -1339,6 +1339,7 @@ get_packages() { has "sorcery" && tot gaze installed has "alps" && tot alps showinstalled has "butch" && tot butch list + has "bonsai" && tot bonsai list # Counting files/dirs. # Variables need to be unquoted here. Only Bedrock Linux is affected. @@ -5458,6 +5459,28 @@ ${c1} oMMNMMMMMMMMMMMMMMMMMMMMMM EOF ;; + "bonsai"*) + set_colors 6 2 3 + read -rd '' ascii_data <<'EOF' +${c2} ,####, + ${c2}#######, ${c2},#####, + ${c2}#####',# ${c2}'###### + ${c2}''###'${c3}';,,,'${c2}###' + ${c3} ,; '''' + ${c3} ;;; ${c2},#####, + ${c3} ;;;' ,,;${c2};;### + ${c3} ';;;;''${c2}'####' + ${c3} ;;; + ${c3} ,.;;';'',,, + ${c3} ' ' +${c1} # + # O + ##, ,##,',##, ,## ,#, , + # # # # #''# #,, # # # + '#' '##' # # ,,# '##;, # +EOF + ;; + "BSD") set_colors 1 7 4 3 6 read -rd '' ascii_data <<'EOF' From 22aaed4d92fc2dc95ef116cd44332067ce6ca47e Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Wed, 31 Jul 2019 20:11:25 +0200 Subject: [PATCH 02/10] display_image: Allow Chafa backend to stretch image to desired size Fixes issue #1295. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ff5b1bee..f95b4e39 100755 --- a/neofetch +++ b/neofetch @@ -3864,7 +3864,7 @@ display_image() { ;; "chafa") - chafa --size="$((width / font_width))x$((height / font_height))" "$image" + chafa --stretch --size="$((width / font_width))x$((height / font_height))" "$image" ;; "jp2a") From ca3291133646ce18155cfc5840385f1df9ee2710 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 5 Aug 2019 18:04:24 +0200 Subject: [PATCH 03/10] packages: Check brew on Linux --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index f95b4e39..aace00e0 100755 --- a/neofetch +++ b/neofetch @@ -1347,6 +1347,7 @@ get_packages() { # shellcheck disable=SC2086 { shopt -s nullglob + has "brew" && dir $(brew --cellar)/* has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/ has "Compile" && dir ${br_prefix}/Programs/*/ has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/* From 296fb68564df0e96bf9a1278a8b01d88def243c9 Mon Sep 17 00:00:00 2001 From: Ryan Hanson <13651296+rxhanson@users.noreply.github.com> Date: Mon, 5 Aug 2019 21:19:24 -0400 Subject: [PATCH 04/10] WM: Add support for Rectangle on macOS Rectangle is a Swift rewrite of the Spectacle application. --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f95b4e39..6a21314d 100755 --- a/neofetch +++ b/neofetch @@ -1631,7 +1631,7 @@ get_wm() { else case "$os" in "Mac OS X") - ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm\|[y]abai')" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm\|[y]abai\|[R]ectangle')" case "$ps_line" in *"chunkwm"*) wm="chunkwm" ;; @@ -1639,6 +1639,7 @@ get_wm() { *"yabai"*) wm="yabai" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; + *"Rectangle"*) wm="Rectangle" ;; *) wm="Quartz Compositor" ;; esac ;; From 4548c56ee7f95dbfb61c312b228af47d55a092b5 Mon Sep 17 00:00:00 2001 From: Ryan Hanson <13651296+rxhanson@users.noreply.github.com> Date: Wed, 7 Aug 2019 09:34:03 -0400 Subject: [PATCH 05/10] Refactored grep for macOS window manager detection Co-Authored-By: nibblonian --- neofetch | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6a21314d..376da939 100755 --- a/neofetch +++ b/neofetch @@ -1631,7 +1631,18 @@ get_wm() { else case "$os" in "Mac OS X") - ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm\|[y]abai\|[R]ectangle')" + wm_names=( + "[S]pectacle" + "[A]methyst" + "[k]wm" + "[c]chun[k]wm" + "[y]abai" + "[R]ectangle" + ) + + regex_part=$( IFS='|'; echo "${wm_names[*]}" ) + + ps_line=$(ps -e | grep -Eio "$regex_part") case "$ps_line" in *"chunkwm"*) wm="chunkwm" ;; From eb5cf17fdb43c64a78614328136d00996f60ef5e Mon Sep 17 00:00:00 2001 From: Ryan Hanson <13651296+rxhanson@users.noreply.github.com> Date: Wed, 7 Aug 2019 09:46:32 -0400 Subject: [PATCH 06/10] Remove unnecessary -i grep flag from wm ps --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 376da939..8e8ca7e1 100755 --- a/neofetch +++ b/neofetch @@ -1642,7 +1642,7 @@ get_wm() { regex_part=$( IFS='|'; echo "${wm_names[*]}" ) - ps_line=$(ps -e | grep -Eio "$regex_part") + ps_line=$(ps -e | grep -Eo "$regex_part") case "$ps_line" in *"chunkwm"*) wm="chunkwm" ;; From a5c4a020c065623dc706985d83986e0103b1bf83 Mon Sep 17 00:00:00 2001 From: Ryan Hanson <13651296+rxhanson@users.noreply.github.com> Date: Wed, 7 Aug 2019 18:12:40 -0400 Subject: [PATCH 07/10] Removed extraneous c from chunkwm match --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8e8ca7e1..2d3adf8b 100755 --- a/neofetch +++ b/neofetch @@ -1635,7 +1635,7 @@ get_wm() { "[S]pectacle" "[A]methyst" "[k]wm" - "[c]chun[k]wm" + "[c]hun[k]wm" "[y]abai" "[R]ectangle" ) From f9fc22eef0409147855860a3082ad4db9241f5d4 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Fri, 9 Aug 2019 14:59:10 +0200 Subject: [PATCH 08/10] packages: Quote --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index aace00e0..ef7ac1fa 100755 --- a/neofetch +++ b/neofetch @@ -1347,7 +1347,7 @@ get_packages() { # shellcheck disable=SC2086 { shopt -s nullglob - has "brew" && dir $(brew --cellar)/* + has "brew" && dir "$(brew --cellar)"/* has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/ has "Compile" && dir ${br_prefix}/Programs/*/ has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/* From 5dc00cba146dd34ce9385344c729ccd0451f5449 Mon Sep 17 00:00:00 2001 From: Ryan Hanson <13651296+rxhanson@users.noreply.github.com> Date: Sat, 10 Aug 2019 17:41:21 -0400 Subject: [PATCH 09/10] Removed subshell from ps grep for macOS wm --- neofetch | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/neofetch b/neofetch index 2d3adf8b..4b3d9fd0 100755 --- a/neofetch +++ b/neofetch @@ -1631,18 +1631,13 @@ get_wm() { else case "$os" in "Mac OS X") - wm_names=( - "[S]pectacle" - "[A]methyst" - "[k]wm" - "[c]hun[k]wm" - "[y]abai" - "[R]ectangle" - ) - - regex_part=$( IFS='|'; echo "${wm_names[*]}" ) - - ps_line=$(ps -e | grep -Eo "$regex_part") + ps_line="$(ps -e | grep -o \ + -e "[S]pectacle" \ + -e "[A]methyst" \ + -e "[k]wm" \ + -e "[c]hun[k]wm" \ + -e "[y]abai" \ + -e "[R]ectangle")" case "$ps_line" in *"chunkwm"*) wm="chunkwm" ;; From 87de174aef3e92049e771ddd11c69d55e51143df Mon Sep 17 00:00:00 2001 From: Alva Date: Tue, 27 Aug 2019 15:25:28 +0200 Subject: [PATCH 10/10] Rename GuixSD to Guix System --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index e9bc5743..f9a1a58a 100755 --- a/neofetch +++ b/neofetch @@ -925,8 +925,8 @@ get_distro() { elif type -p guix >/dev/null; then case "$distro_shorthand" in - "on" | "tiny") distro="GuixSD" ;; - *) distro="GuixSD $(guix system -V | awk 'NR==1{printf $5}')" + "on" | "tiny") distro="Guix System" ;; + *) distro="Guix System $(guix system -V | awk 'NR==1{printf $5}')" esac else