[PR] dylanaraps/neofetch#1642 from rasa - neofetch: Strengthen scoop/choco app reporting
Upstream PR: https://github.com/dylanaraps/neofetch/pull/1642 Thanks to @rasa Co-authored-by: Ross Smith II <ross@smithii.com>
This commit is contained in:
commit
b0b4ef9d80
1 changed files with 17 additions and 2 deletions
19
neofetch
19
neofetch
|
|
@ -1903,13 +1903,28 @@ get_packages() {
|
||||||
MSYS*) has pacman && tot pacman -Qq --color never ;;
|
MSYS*) has pacman && tot pacman -Qq --color never ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
ProgramData=$(cygpath --folder 0x0023 2>/dev/null)
|
||||||
|
if [[ -z "$ProgramData" ]]; then
|
||||||
|
mount=$(awk '/^C:\s/ {print $2}' /proc/mounts 2>/dev/null)
|
||||||
|
ProgramData="${mount:-/cygdrive/c}/ProgramData"
|
||||||
|
fi
|
||||||
|
|
||||||
# Scoop environment throws errors if `tot scoop list` is used
|
# Scoop environment throws errors if `tot scoop list` is used
|
||||||
has scoop && pkgs_h=1 dir ~/scoop/apps/* && ((packages-=1))
|
has scoop && {
|
||||||
|
sdir=$(cygpath "$SCOOP" 2>/dev/null)
|
||||||
|
sdir="${sdir:-$HOME/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.
|
# Count chocolatey packages.
|
||||||
# [[ -d /c/ProgramData/chocolatey/lib ]] && \
|
# [[ -d /c/ProgramData/chocolatey/lib ]] && \
|
||||||
# dir /c/ProgramData/chocolatey/lib/*
|
# dir /c/ProgramData/chocolatey/lib/*
|
||||||
has choco && tot choco list --localonly
|
# has choco && tot choco list --localonly
|
||||||
|
has choco && dir "$ProgramData"/chocolatey/lib/*
|
||||||
|
|
||||||
# Count winget
|
# Count winget
|
||||||
has winget && tot winget list
|
has winget && tot winget list
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue