Enofetch project address https://github.com/dylanaraps/neofetch
The wiki of enofetch: Home · dylanaraps/neofetch Wiki · GitHub
//The location of the configuration file
Each user’s neofetch configuration location is ${HOME}/.config/neofetch/config.conf
, if installed correctly (using Makefile or Distro package), neofetch will copy it on the first run default allocation.
That is to say, when we change the system information, we need to modify the content of the config.conf file in this path. If you can’t find this file, you can solve the problem by reinstalling it.
sudo pacman -R neofetch
p: If the linux system does not specify the location of /home separately, then this path starts from “/” in the directory, for example “/home/serinder/.config/neofetch/config.config”
//ot
Neofetch also installs a system-wide editable configuration file at /etc/neofetch/config.conf
(this is where it copies user configurations).
You can ignore this information, some systems cannot find this path and file
1, modify the information on the right
//Print Info Function print information function
The string in double quotes (“model”) is the subtitle for each line of information, which can be changed to whatever you like or removed entirely.
Here’s what the function looks like:
print_info () { info title info underline info "Host" model info "OS" distro info "Kernel" kernel info "Uptime" uptime info "Packages" packages info "Shell" shell info "Resolution" resolution info "DE" de info "WM" wm info "WM Theme" wm_theme info "Theme" theme info "Icons" icons info "Terminal" term info "Terminal Font" term_font info "CPU" cpu info "GPU" gpu info "Memory" memory # The lines below with a '#' in front are additional info functions # that are disabled by default. Removing the '#' enables them and adding # a '#' to the start disables them again. You can add a '#' to any of the # lines in this function to disable their output. # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery # info "Font" font # info "Song" song # info "Local IP" local_ip # info "Public IP" public_ip # info "Users" users # info "Birthday" birthday //cn The following lines with # in front are additional information functions # Disabled by default. remove '#' to enable them and add # a '#' disables them again. You can add "#" to any option # lines disable their output in this function. # info "CPU usage" cpu_usage # info "Disk" # info "Battery"Battery # info "Font" font # info "Song" # info "Local IP" local_ip # info "public_ip" # info "Users" users # info "Birthday" birthday info cols }
In this code example, the default code example is listed, which corresponds to the output content on the right when using neofetch
like:
[serinder@serinderArch neofetch]$ neofetch ./o. serinder@serinderArch ./sssso---------------------- `:osssssss + - OS: EndeavourOS Linux x86_64 `: +sssssssssso/.Kernel: 6.1.12-arch1-1 `-/ossssssssssssso/. Uptime: 9 hours, 16 mins `-/ + sssssssssssssssso + :` Packages: 1074 (pacman) `-:/ + sssssssssssssssssso + /. Shell: bash 5.1.16 `.://osssssssssssssssssssso + + - Resolution: 1366x768 .:// + ssssssssssssssssssssssso + + : DE: Plasma 5.27.1 .:///ossssssssssssssssssssssssso + + : WM: KWin `:ssssssssssssssssssssssssssso + + + . WM Theme: Breeze `- + sssssssssssssssssssssssssssso + + + + - Theme: [Plasma], Breeze [GTK2/3] `..- + oosssssssssssssssssssssssssso + + + + + /` Icons: [Plasma], breeze-dark [GTK2/3] ./ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /:. Terminal: konsole `:::::::::::::::::::::::::------`` CPU: Intel i3-2120 (4) @ 3.300GHz GPU: NVIDIA GeForce GT 610 Memory: 3724MiB / 5876MiB
If you need to add information on the right [such as local ip, etc.]
Full list of functions: Full list of functions:
distro
model
kernel
uptime
packages
shell
resolution
de
wm
wm_theme
theme
icons
cpu
gpu
memory
font
disk
battery
song
code> local_ip
public_ip
users
birthday
term
term_font
cpu_usage
Special functions: Special functions:
underline
title
If we need to add a display item, we need to find the function in the above function and add it to the configuration file
The format is as info "[name of function displayed]" [function]
If we want to add a local IP address information, we need to use the above loacl_ip function, just add it in the configuration file
【
It is recommended to copy the file to another location when modifying the configuration file, and then modify
】
Added an “ipv4” under features using the feature “local_ip”
[The vim editor saves information through w, other editors can also]
output
It can be seen that it has been modified [if an error occurs, the execution of that line will be skipped]
You can speed up the script by adding & amp; and wait at the bottom to run asynchronously
print_info () { # Lines without an ' & amp;' sign will be displayed in # the order they appear here. info title info underline info "OS" distro & info "Kernel" kernel & info "Uptime" uptime & info "Packages" packages & info "Shell" shell & info "Window Manager" wm & info "GTK Theme" theme & info "Icons" icons & info "CPU" cpu & info "GPU" gpu & info "Memory" memory & # Wait for the functions to complete wait info cols }
2, modify the os_logo on the left
Change default image mode from ascii
to wallpaper
. Starting with 2.0.1, using image mode requires an extra step.
You can use the launch option --w3m
(also --w3m /path/to/img
/ --w3m /path/to/dir/
), or edit the configuration file to enable image mode. The option you have to change is called image_backend
, just change it from ascii
to one of the other valid values and image mode will be enabled.
Styles for each display mode are available in Image Backends dylanaraps/neofetch Wiki GitHub
Terminal Emulator | w3m-img | Quirks |
---|---|---|
Gnome-terminal | Yes | – Image disappears on window focus and resize |
– Possible issues on Fedora, see #295 | ||
iTerm | N/A | See [1] |
konsole | Yes | |
st | Yes | Image disappears on window focus and resize |
Terminator | Yes | Image disappears on window focus and resize |
Terminology | N/A | See [2] |
Termite | Yes | Highlighting the image makes the highlighted parts disappear |
tilda | No | |
URxvt | Yes | Image disappears on window focus and resize |
Xfce4-terminal | Yes | Image disappears on window focus and resize |
Xterm | Yes | |
kitty | N/A | See [3] |
alacritty | No |
kitty
, Terminology
and iTerm
users do not need to install w3 m-img.
Before that, you need to install w3m [render image], feh [get wallpaper, print], imagemagic [make thumbnail], xdotool [get terminal window resolution to make thumbnail], etc. (you can also choose other tools, in The wiki has a detailed introduction)