From 2f2540bc2ebdae88bd9be104fb366781f1eeb647 Mon Sep 17 00:00:00 2001 From: Willem Mulder Date: Wed, 19 Jun 2019 19:49:55 +0200 Subject: [PATCH 1/3] Set nullglob for package counting This prevents package managers showing up as having installed 1 package, while it's actually 0. --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index f20701c9..042a2414 100755 --- a/neofetch +++ b/neofetch @@ -1343,6 +1343,7 @@ get_packages() { # $br_prefix is fixed and won't change based on user input so this is safe either way. # shellcheck disable=SC2086 { + shopt -s nullglob has "emerge" && dir ${br_prefix}/var/db/pkg/*/*/ has "Compile" && dir ${br_prefix}/Programs/*/ has "eopkg" && dir ${br_prefix}/var/lib/eopkg/package/* @@ -1350,6 +1351,7 @@ get_packages() { has "pkgtool" && dir ${br_prefix}/var/log/packages/* has "cave" && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \ ${br_prefix}/var/db/paludis/repositories/installed/data/*/ + shopt -u nullglob } # Other (Needs complex command) From 1316df5df843fabeca511ba26188ddc7b59d7be3 Mon Sep 17 00:00:00 2001 From: Renzix Date: Thu, 20 Jun 2019 13:19:55 -0400 Subject: [PATCH 2/3] Moved guix check below /etc/os-release check --- neofetch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index 042a2414..efcac0d2 100755 --- a/neofetch +++ b/neofetch @@ -883,12 +883,6 @@ get_distro() { *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" esac - 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}')" - esac - elif type -p crux >/dev/null; then distro="$(crux)" case "$distro_shorthand" in @@ -928,6 +922,13 @@ get_distro() { "tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;; "off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;; esac + + 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}')" + esac + else for release_file in /etc/*-release; do distro+="$(< "$release_file")" From 177644c18e31f1b0d6de0c193841aa8e9223226d Mon Sep 17 00:00:00 2001 From: Weslly Date: Sun, 23 Jun 2019 14:31:31 -0300 Subject: [PATCH 3/3] WM: Add support for yabai on macOS --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index efcac0d2..311838c8 100755 --- a/neofetch +++ b/neofetch @@ -1626,11 +1626,12 @@ 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')" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm\|[y]abai')" case "$ps_line" in *"chunkwm"*) wm="chunkwm" ;; *"kwm"*) wm="Kwm" ;; + *"yabai"*) wm="yabai" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;;