neofetch本地化
2023-03-16 本文已影响0人
Fisher123
终端执行neofetch
命令默认效果:
找到config.conf
配置文件,位置:${HOME}/.config/neofetch/config.conf
,如下图:
原来的配置文件:
print_info() {
info title
info underline
info "OS" distro
info "Host" model
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
# info "GPU Driver" gpu_driver # Linux/macOS only
info "CPU Usage" cpu_usage
# info "Disk" disk
info "Battery" battery
info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "Locale" locale # This only works on glibc systems.
info cols
}
改成:
# 注释掉上边的配置文件,本地化成简体中文
print_info() {
info title
info underline
#OS
info "操作系统" distro
#Host
info "型 号" model
#Kernel
info "内核版本" kernel
#Uptime
info "开机时间" uptime
prin "当前时间" "$(date +%Y年%m月%d"日 "%H:%M:%S)"
#Packages
#info "Packages" packages
info "S h e ll" shell
#Resolution
info "分 辨 率" resolution
#info "DE" de
#info "WM" wm
#WM Theme
info "主 题" wm_theme
info "Theme" theme
info "Icons" icons
#Terminal
info "终 端" term
#Terminal Font
info "终端字体" term_font
#CPU
info "处 理 器" cpu
#GPU
info "设备显卡" gpu
#Memory
info "内 存" memory
#info "GPU Driver" gpu_driver # Linux/macOS only
# CPU Usage
info "CPU 已用" cpu_usage
#info "Disk" disk
#Battery
info "剩余电量" battery
# info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
# 本地IP
info "内 网 IP" local_ip
#Public IP
info "公 网 IP" public_ip
#Users
#info "用户" users
#Locale
info "语 言" locale # This only works on glibc systems.
info cols
}
终端再次执行neofetch
命令效果: