ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
749 stars 52 forks source link

[FEATURE-REQUEST] Call package manager from PATH instead of hard-coding paths #248

Open antecrescent opened 11 months ago

antecrescent commented 11 months ago

Is your feature request related to a problem? Please describe. Currently, uwufetch relies on the undocumented PKGPATH macro to define the path to where the package manager lies. If not set, it defaults to /usr/local/bin and /usr/bin for macOS and other operating systems respectively. This logic breaks non-standard/exotic setups such as running uwufetch in prefixed Gentoo Linux, where the resulting absolute path to qlist would be ${EPREFIX}/usr/bin/qlist with EPREFIX being an arbitrary user-accessible directory.

Describe the solution you'd like I suggest calling the package managers from PATH. The implementation should be straight forward and it has the bonus of being flexible with respect to moving binaries.

Describe alternatives you've considered Account for exotic setups by documenting and defining PKGPATH at compile time and adapt the libfetch logic accordingly. This needs uwufetch to recompile upon migration of the package manager's install location.

ad-oliviero commented 11 months ago

I'll work on that