From df71b0132aa01b8d38b5a444dd6efe86b0056729 Mon Sep 17 00:00:00 2001 From: Nejc Bertoncelj Date: Sat, 30 Nov 2024 20:11:00 +0100 Subject: [PATCH] neofetch: Speed-up rpm total package count Skipping package digest and signature verification yields a significant speed-up when counting total packages. Idea taken from rpm's bash-completion script. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 32601b5c..def90fde 100755 --- a/neofetch +++ b/neofetch @@ -2199,7 +2199,7 @@ get_packages() { if has dnf && type -p sqlite3 >/dev/null && [[ -f /var/cache/dnf/packages.db ]]; then pac "$(sqlite3 /var/cache/dnf/packages.db "SELECT count(pkg) FROM installed")" else - has rpm && tot rpm -qa + has rpm && tot rpm -qa --nodigest --nosignature fi # 'mine' conflicts with minesweeper games. @@ -2360,7 +2360,7 @@ get_packages() { AIX|FreeMiNT) has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#'))) - has rpm && tot rpm -qa + has rpm && tot rpm -qa --nodigest --nosignature ;; Windows)