Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more package managers and AppImageLauncher #337

Merged
merged 8 commits into from
Oct 23, 2024
26 changes: 22 additions & 4 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,7 @@ get_packages() {
# Programming language package managers.
if [[ -z "$package_minimal" ]]; then
has pipx && tot pipx list --short
has pip && tot pip freeze
has cargo && _cargopkgs="$(cargo install --list | grep -v '^ ')" && tot echo "$_cargopkgs"

# Special case for npm: If has npm, we should list folders under node_modules instead of using npm list.
Expand Down Expand Up @@ -2150,9 +2151,17 @@ get_packages() {
has bulge && tot bulge list
has pm && tot-safe pm list packages
has evox && tot cat /var/evox/packages/DB
has squirrel && tot ls /var/packages
has squirrel && tot ls -w 1 /var/packages
has anise && tot anise s --installed
has am && pac "$(am -f --less)"
has bonsai && tot bonsai list
Copy link
Owner

@hykilpikonna hykilpikonna Aug 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find a package manager named bonsai... searching for "bonsai linux package manager" doesn't give any meaningful results, besides from an abandoned repo (which uses the command bs instead of bonsai) and another repo that only has two stars. Which bonsai did you want to add support for?

Nevermind, I just saw the PR comment, sorry ;-;

has pkg_info && tot pkg_info -i
has guix && tot guix package --list-installed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guix already exists below (line 2216 and 2233)

has rad && tot rad -cl
has radula && tot radula -cl # 'Rad' was previously called 'Radula', some systems may still have the old name.
has urpmq && tot urpmq --list-media active
has birb && tot birb --list-installed


# Using the dnf package cache is much faster than rpm.
if has dnf && type -p sqlite3 >/dev/null && [[ -f /var/cache/dnf/packages.db ]]; then
Expand Down Expand Up @@ -2283,9 +2292,18 @@ get_packages() {
has snap && ps -e | grep -qFm 1 snapd >/dev/null && \
pkgs_h=1 tot snap list && ((packages-=1))

# This is the only standard location for appimages.
# See: https://github.com/AppImage/AppImageKit/wiki
manager=appimage && has appimaged && dir ~/.local/bin/*.[Aa]pp[Ii]mage
# Get AppImageLauncher Application directory,
# See: https://github.com/TheAssassin/AppImageLauncher/wiki/Configuration#settings-file
manager=appimage && has appimaged || [ -f $HOME/.config/appimagelauncher.cfg ] &&
if [ -f $HOME/.config/appimagelauncher.cfg ]; then
ALDIR=$(cat $HOME/.config/appimagelauncher.cfg | grep "destination" --color=never | sed 's/^.*= //')
[ $(ls -w 1 $ALDIR | grep -ic "AppImage") = "0" ] && unset ALDIR
fi &&
if [ -f $HOME/.local/bin/*.[Aa]pp[Ii]mage ]; then
AIDIR="$HOME/.local/bin"
fi &&
dir "$AIDIR/*.[Aa]pp[Ii]mage \
$ALDIR/*.[Aa]pp[Ii]mage"

# Has devbox & is initialized
has devbox && [[ "$(devbox global list)" != *"not activated"* ]] && tot devbox global list
Expand Down
Loading