Neofetch 是一个简单但有用的命令行系统信息工具, 它用 Bash 编写。它会收集有关系统软硬件的信息, 并在终端中显示结果.
安装
Mac 系统
brew install neofetch
FreeBSD 系统
pkg install neofetch
运行
neofetch
配置
第一次运行 Neofetch 时, 它默认会为每个用户在 $HOME/.config/neofetch/config.conf
中创建一个配置文件.
配置说明简单, 可以自行修改配置信息.
设置为打开终端自动运行
将 neofetch
命令写入终端配置文件即可.
Zsh
在~/.zshrc
中添加一行:
neofetch
fish
在~/.config/fish/config.fish
中添加:
neofetch
我的配置
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
#info title
info underline
info "OS" distro
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "Terminal" term
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
info "Disk" disk
info "Battery" battery
[[ "$player" ]] && prin "Music Player" "$player"
info cols
}
title_fqdn="off"
kernel_shorthand="off"
distro_shorthand="off"
os_arch="on"
uptime_shorthand="tiny"
memory_percent="on"
package_managers="on"
shell_path="off"
shell_version="on"
speed_type="bios_limit"
speed_shorthand="on"
cpu_brand="on"
cpu_speed="on"
cpu_cores="logical"
cpu_temp="C"
gpu_brand="on"
gpu_type="all"
refresh_rate="off"
gtk_shorthand="off"
gtk2="on"
gtk3="on"
de_version="on"
disk_show=('/')
disk_subtitle="mount"
disk_percent="on"
music_player="auto"
song_format="%artist% - %album% - %title%"
song_shorthand="off"
mpc_args=()
colors=(distro)
bold="on"
underline_enabled="on"
underline_char="-"
separator=":"
block_range=(0 15)
color_blocks="off"
block_width=3
block_height=1
col_offset="auto"
bar_char_elapsed="-"
bar_char_total="="
bar_border="on"
bar_length=15
bar_color_elapsed="distro"
bar_color_total="distro"
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
image_backend="ascii"
image_source="auto"
ascii_distro="auto"
ascii_colors=(distro)
ascii_bold="on"
image_loop="off"
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
crop_mode="normal"
crop_offset="center"
image_size="auto"
gap=3
yoffset=0
xoffset=0
background_color=
stdout="off"