Skip to content

Packages: add AppImage counting#2256

Open
mvanhorn wants to merge 1 commit intofastfetch-cli:devfrom
mvanhorn:osc/2179-appimage-packages
Open

Packages: add AppImage counting#2256
mvanhorn wants to merge 1 commit intofastfetch-cli:devfrom
mvanhorn:osc/2179-appimage-packages

Conversation

@mvanhorn
Copy link
Copy Markdown

Summary

Adds AppImage package counting to fastfetch. Scans ~/AppImages and ~/Applications for files ending in .appimage (case-insensitive) and includes the count in the packages display.

Why this matters

Per issue #2179, Gear Lever stores AppImages in ~/AppImages and AppImageLauncher stores them in ~/Applications. These are currently invisible in the packages count. @CarterLi expressed openness to the idea.

Changes

  • packages.h: Add uint32_t appimage field to FFPackagesResult
  • option.h: Add FF_PACKAGES_FLAG_APPIMAGE_BIT (bit 33)
  • packages_linux.c: Add getNumElementsBySuffix() helper that counts files by extension suffix (uses ffStrEndsWithIgnCase). Detection block scans both ~/AppImages and ~/Applications for .appimage files.
  • packages.c: Wire into all 5 integration points (FF_PRINT_PACKAGE, FF_ARG, FF_APPEND_PACKAGE_COUNT, FF_TEST_PACKAGE_NAME, formatArgs)
  • CMakeLists.txt: Add APPIMAGE to PACKAGE_MANAGERS list
  • json_schema.json: Add {appimage} format placeholder

Only files with .appimage/.AppImage extension are counted to avoid false positives in ~/Applications.

Testing

Follows the exact pattern established by soar and other package managers. Extension matching uses the existing ffStrEndsWithIgnCase helper.

Fixes #2179

This contribution was developed with AI assistance (Codex).

Scan ~/AppImages and ~/Applications for .AppImage files
and include them in the packages count.

Fixes fastfetch-cli#2179

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add AppImages to the Packages listing

1 participant