How to implement fastfetch information in the terminal at each startup is a fairly simple procedure. Since they helped me implement an info that usually isn’t there, I’m opening this thread for the procedure, and I’ll also add the two additions that I used (to not use them, just don’t add the scripts).
Obviously, this kind of guide is aimed more at novices like me, but in the end it can be open to everyone.
I’ll make a step-by-step “guide”.
So, let’s start by saying that in addition to the terminal, we need fastfetch installed on the system. So, to install fastfetch just give this command in the terminal:
sudo pacman -S fastfetch
Fastfetch also has optional dependencies that can be installed, they are additional modules of various kinds, from more in-depth hardware detection or various other hardware to the output logos.
Then I’ll tell you what they are, for now it’s fine like this.
Anyway, once fastfetch is installed you need to make it generate a configuration file, with the following command from the terminal:
fastfetch --gen-config
To be able to edit what fastfetch shows in the terminal, and therefore edit the configuration file created, at this point you need to use the command from the terminal:
nano ~/.config/fastfetch/config.jsonc
In the terminal you will see the configuration file opened with “nano”, a text editor, and where you can go to modify, remove or add options, then save and exit.
So, once in the screen, use the // symbols to remove the items that you do not want to show, for example:
// “terminal”,
After that you can save with CNTRL+O and exit with CNTRL+X.
Once this is done, to add the execution of fastfetch with the terminal, type the command:
nano ~/.bashrc
And in the screen add the following to the last line:
fastfetch
After that you can save and exit (always with CNTRL+O to save and CNTRL+X to exit), and at the next restart of the terminal you will have the console with the fastfetch info shown in the terminal.
Thanks to SynAck for helping me put the weather info of my city, which you can find here:
The optional dependencies of fastfetch are: chafa, dbus, dconf, ddcutil, directx-headers, glib2, hwdata, imagemagick, libdrm, libelf, libpulse, libxrandr, ocl-icd, sqlite, vulkan-icd-loader, xfconf, zlib. To install them, just give the command:
sudo pacman -S chafa dbus dconf ddcutil directx-headers glib2 hwdata imagemagick libdrm libelf libpulse libxrandr ocl-icd sqlite vulkan-icd-loader xfconf zlib
That’s if you want to install them all. If you’re only interested in some optional dependencies, just put those.
But what are these optional dependencies for? Here’s what they do:
Description of dependencies
chafa : Image output as ascii art
dbus : Bluetooth, Player & Media detection
dconf : Needed for values that are only stored in DConf + Fallback for GSettings
ddcutil : Brightness detection of external displays
directx-headers : GPU detection in WSL
glib2 : Output for values that are only stored in GSettings
hwdata : GPU output
imagemagick : Image output using sixel or kitty graphics protocol
libdrm : Displays detection
libelf : st term font detection and fast path of systemd version detection
libpulse : Sound detection
libxrandr : Multi monitor support
ocl-icd : OpenCL module
sqlite : Needed for Sqlite integration and Soar packages count
vulkan-icd-loader : Vulkan module & fallback for GPU output
xfconf : Needed for XFWM theme and XFCE Terminal font
zlib : Faster image output when using kitty graphics protocol
And if you also want to know how long your operating system has been installed, you can add the script that I will indicate below, to have this information (there is no module age of the os, so you need to add a script).
script OS Age
The script is this:
the first way
{
"type": "command",
"key": "OS Age",
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days",
"keyColor": "magenta"
},
And the result in the fastfetch configuration file will be something like this:
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"title",
"separator",
"os",
"host",
"kernel",
"uptime",
{
"type": "command",
"key": "OS Age",
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days",
"keyColor": "magenta"
},
"packages",
"shell",
You can use the one inside the “spoiler” above, or the one suggested by SynAck, which does the exact same thing but is shorter:
OS Age script by SynAck
{
"type": "command",
"key": "OS Age",
"text": "echo $(( ($(date +%s) - $(stat -c %W /)) / 86400 )) days",
"keyColor": "magenta"
},
And the resulting, in the fastfetch configuration file will be like this:
GNU nano 8.4 /home/sermor/.config/fastfetch/config.jsonc
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"modules": [
"title",
"separator",
"os",
"host",
"kernel",
"uptime",
{
"type": "command",
"key": "OS Age",
"text": "echo $(( ($(date +%s) - $(stat -c %W /)) / 86400 )) days",
"keyColor": "magenta"
},
"packages",
"shell",
"display",
Well, that’s all, I hope this can be helpful to you!
