neofetch: Strengthen scoop/choco app reporting
This commit is contained in:
parent
6dd85d67fc
commit
5d9b77c9b0
1 changed files with 18 additions and 5 deletions
23
neofetch
23
neofetch
|
@ -1634,12 +1634,25 @@ get_packages() {
|
|||
MSYS*) has pacman && tot pacman -Qq --color never ;;
|
||||
esac
|
||||
|
||||
# Scoop environment throws errors if `tot scoop list` is used
|
||||
has scoop && pkgs_h=1 dir ~/scoop/apps/* && ((packages-=1))
|
||||
ProgramData=$(cygpath --folder 0x0023 2>/dev/null)
|
||||
if [[ -z $ProgramData ]]; then
|
||||
mount=$(awk '/^C:/ {print $2}' /proc/mounts 2>/dev/null)
|
||||
ProgramData=${ProgramData:-${c_mount:-/cygdrive/c}/ProgramData}
|
||||
fi
|
||||
|
||||
# Count chocolatey packages.
|
||||
[[ -d /cygdrive/c/ProgramData/chocolatey/lib ]] && \
|
||||
dir /cygdrive/c/ProgramData/chocolatey/lib/*
|
||||
# Scoop environment throws errors if `tot scoop list` is used
|
||||
has scoop && {
|
||||
sdir=$(cygpath "${SCOOP}" 2>/dev/null)
|
||||
sdir=${sdir:-~/scoop}
|
||||
pkgs_h=1 dir ${sdir}/apps/* && ((packages-=1))
|
||||
manager=scoop-global
|
||||
sdir=$(cygpath "${SCOOP_GLOBAL}" 2>/dev/null)
|
||||
sdir=${sdir:-$ProgramData/scoop}
|
||||
dir ${sdir}/apps/*
|
||||
}
|
||||
|
||||
# Count chocolatey packages.
|
||||
has choco && dir $ProgramData/chocolatey/lib/*
|
||||
;;
|
||||
|
||||
Haiku)
|
||||
|
|
Loading…
Reference in a new issue