From bec3918bfdf383e4695f3308a50e1115a1064c18 Mon Sep 17 00:00:00 2001 From: Kanashimia <56224949+kanashimia@users.noreply.github.com> Date: Thu, 26 Nov 2020 07:11:09 +0200 Subject: [PATCH] NixOS - squash logo, add new package location. (#1617) * Decrease size of NixOS logo by one block. * Improve package counting for NixOS. --- neofetch | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/neofetch b/neofetch index 7b68ffb3..ed7116ae 100755 --- a/neofetch +++ b/neofetch @@ -1566,9 +1566,13 @@ get_packages() { } has nix-store && { - manager=nix-system && tot nix-store -q --requisites /run/current-system/sw - manager=nix-user && tot nix-store -q --requisites ~/.nix-profile - manager=nix-default && tot nix-store -q --requisites /nix/var/nix/profiles/default + nix-user-pkgs() { + nix-store -qR ~/.nix-profile + nix-store -qR /etc/profiles/per-user/"$USER" + } + manager=nix-system && tot nix-store -qR /run/current-system/sw + manager=nix-user && tot nix-user-pkgs + manager=nix-default && tot nix-store -qR /nix/var/nix/profiles/default } # pkginfo is also the name of a python package manager which is painfully slow. @@ -1607,8 +1611,12 @@ get_packages() { has pkgin && tot pkgin list has nix-store && { - manager=nix-system && tot nix-store -q --requisites "/run/current-system/sw" - manager=nix-user && tot nix-store -q --requisites "$HOME/.nix-profile" + nix-user-pkgs() { + nix-store -qR ~/.nix-profile + nix-store -qR /etc/profiles/per-user/"$USER" + } + manager=nix-system && tot nix-store -qR /run/current-system/sw + manager=nix-user && tot nix-store -qR nix-user-pkgs } ;; @@ -8559,7 +8567,7 @@ EOF "NixOS"*) set_colors 4 6 read -rd '' ascii_data <<'EOF' -${c1} ▗██▙ ${c2}▜███▙ ▟██▖ +${c1} ▗▄▄▄ ${c2}▗▄▄▄▄ ▄▄▄▖ ${c1} ▜███▙ ${c2}▜███▙ ▟███▛ ${c1} ▜███▙ ${c2}▜███▙▟███▛ ${c1} ▜███▙ ${c2}▜██████▛ @@ -8578,7 +8586,7 @@ ${c2} ▜▛ ${c1}▟████▙ ${c2}▜█████████ ${c1} ▟██████▙ ${c2}▜███▙ ${c1} ▟███▛▜███▙ ${c2}▜███▙ ${c1} ▟███▛ ▜███▙ ${c2}▜███▙ -${c1} ▝██▛ ▜███▙ ${c2}▜██▘ +${c1} ▝▀▀▀ ▀▀▀▀▘ ${c2}▀▀▀▘ EOF ;;