dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
22k stars 1.77k forks source link

[Feature Suggestion] Support for codenames. From Debian and other common distros. #2437

Open dewcansam opened 8 months ago

dewcansam commented 8 months ago

[Feature Suggestion] Support for codenames. From Debian and other common distros.

Description

Add support for codenames. From Debian, Ubuntu, Mint and others. I have always had to look up my version then google which codename was used. Although I finally found a webpage for "Distro Code Names" and bookmarked it. I was trying to install docker and saw a command I had never seen before and it's output. I was astounded to find that getting the code name was as easy as: apt-cache policy vim I am really terrible with regex (got something to learn) or else I would create a alias function to pull it out.

I studied the wiki but was unable to find any way to garner the codename. If there is a way please enlighten me. If not the please include it in the neofetch output. It would make things so much easier. And it seems so easy to gather the codename from the apt-cache policy output.

Output from neofetch computer 1: OS: Linux Mint 19.3 Tricia x86_64 Output from apt-cache policy computer 1 : bionic/main amd64 Example from computer 1. In this case the codename "bionic" does not match the neofetch "Tricia" output.

Example from computer 2. Output from neofetch computer 2: OS: Linux Mint 20.3 x86_64 Output from apt-cache policy computer 2: focal/main amd64 Example from computer 2. In this case the codename "focal" is NOT displayed at all in the neofetch output.

tnsicdr commented 8 months ago

You can pull it by running the following:

. /etc/os-release | printf '%s\n' "$VERSION"
dewcansam commented 8 months ago

Unfortunately I could not get an output from that command. But, yes the information is there. I did just a simple grep for 'codename'. cat /etc/os-release | grep -i "codename"