neofetch在终端显示系统信息

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"

 上一篇
Go Build 编译 Go Build 编译
不同平台交叉编译Golang 支持在一个平台下生成另一个平台可执行程序的交叉编译功能. 交叉编译命令CGO_ENABLED=0 GOOS=目标操作系统 GOARCH=目标系统架构 go build test.go 示例Mac 操作系统下编译
2020-06-12
下一篇 
Git全局忽略.DS_Store文件 Git全局忽略.DS_Store文件
全局忽略.DS_Store编辑~/.gitignore_global, 添加: .DS_Store .DS_Store? *.DS_Store在~/.gitconfig中引入.gitignore_global文件 git config --
2020-06-11
  目录