fastfetch icon indicating copy to clipboard operation
fastfetch copied to clipboard

[FEAT] Support SDKMAN! Package Count

Open iskandergaba opened this issue 2 months ago • 2 comments

Description

Add SDKMAN! package count to the output.

Motivation

I think this falls under the same category as other package managers. SDKMAN! is popular and widely used across multiple Unix platforms to install system-wide SDKs and frameworks.

Additional context

This should be relatively easy and useful for those using SDKMAN! to install SDKs and packages. Here's how to detect the count:

  1. Get the candidates' directory from the variable $SDKMAN_CANDIDATES_DIR. If it is empty, then SDKMAN! is not installed.
  2. Count the number of non-empty directories inside $SDKMAN_CANDIDATES_DIR. SDKMAN! can leave empty directories for uninstalled SDK candidates, so it is important to count the non-empty directories only (i.e., a bit more involved than a simple getNumElements call).

Note that this counts every SDK or framework installed as 1 (even if there are multiple versions installed for it), which is, in my opinion, the correct thing to do.

iskandergaba avatar Oct 26 '25 12:10 iskandergaba