fastfetch

更快的系统信息查看工具

简介

fastfetch

一个类似 neofetch 的命令行工具,可以在终端里概览系统的相关信息。它采用 C 语言编写,相较于 bash 写的 neofetch 更快,显示的信息包括操作系统、Shell、内核、CPU、GPU、内存等。

Apple





仓库地址https://github.com/fastfetch-cli/fastfetch
文档https://github.com/fastfetch-cli/fastfetch/wiki

安装

shell
1
yay -S fastfetch
shell
1
sudo apt install fastfetch
shell
1
2
3
4
5
6
sudo apt install fastfetch

# 或
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
sudo apt update
sudo apt install fastfetch
shell
1
brew install fastfetch
shell
1
scoop install fastfetch
shell
1
choco install fastfetch
shell
1
winget install fastfetch

使用

配置文件

配置文件在 ~/.config/fastfetch/config.jsonc

我的配置是:

~/.config/fastfetch.jsonc
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ~/.config/fastfetch/config.jsonc
// See https://github.com/fastfetch-cli/fastfetch/wiki/Configuration for more details
// See *.jsonc in https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples for more examples
{
    "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
    "logo": {
      "type": "builtin",
      "color": {"1": "blue", "2": "blue"}
    },
    "display": {
        "separator": " → ",
        "stat": true,
        "color":"green"
     },
     "modules": [
        "title",
        "break",
        {
            "type": "os",
            "format": "{3} {10}({12})"
        },
        "kernel",
        "packages",
        "de",
        "wm",
        "terminal",
        "shell",
        "uptime",
        "break",
        "host",
        "cpu",
        "memory",
        "disk",
        {
            "type": "colors",
            "symbol": "circle"
        }
     ]
}

加入 .bashrc .zshrc

加入 .bashrc.zshrc 文件后,可以实现每次打开都显示系统信息。

.zshrc
1
2
3
4
fastfetch

# 也可以配合 lolcat 实现彩虹色效果
fastfetch | lolcat