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.
This commit is contained in:
parent
bb260890c5
commit
df71b0132a
1 changed files with 2 additions and 2 deletions
4
neofetch
4
neofetch
|
|
@ -2199,7 +2199,7 @@ get_packages() {
|
||||||
if has dnf && type -p sqlite3 >/dev/null && [[ -f /var/cache/dnf/packages.db ]]; then
|
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")"
|
pac "$(sqlite3 /var/cache/dnf/packages.db "SELECT count(pkg) FROM installed")"
|
||||||
else
|
else
|
||||||
has rpm && tot rpm -qa
|
has rpm && tot rpm -qa --nodigest --nosignature
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 'mine' conflicts with minesweeper games.
|
# 'mine' conflicts with minesweeper games.
|
||||||
|
|
@ -2360,7 +2360,7 @@ get_packages() {
|
||||||
|
|
||||||
AIX|FreeMiNT)
|
AIX|FreeMiNT)
|
||||||
has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#')))
|
has lslpp && ((packages+=$(lslpp -J -l -q | grep -cv '^#')))
|
||||||
has rpm && tot rpm -qa
|
has rpm && tot rpm -qa --nodigest --nosignature
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Windows)
|
Windows)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue