4 个版本 (2 个重大更改)
0.3.0 | 2024 年 8 月 4 日 |
---|---|
0.2.1 | 2024 年 7 月 29 日 |
0.2.0 | 2024 年 7 月 29 日 |
0.1.2 | 2024 年 7 月 29 日 |
#430 在 文件系统
每月 354 次下载
80KB
719 行
nxfetch
一个最小化、快速且内置电池的获取器!
nxfetch
安装
Cargo
cargo install --git https://git.sr.ht/~sntx/nxfetch --locked
Cargo (手动)
git clone https://git.sr.ht/~sntx/nxfetch && cd nxfetch
cargo install --path . --locked
Nix Shell
nix shell sourcehut:~sntx/nxfetch
使用方法
A minimal, fast and batteries included fetcher!
Usage: nxfetch [OPTIONS] [MODULES]...
Arguments:
[MODULES]... A list of module names nxfetch should display [possible values: colours, colours-bright, colours-dual, cpu, disk, disks, desktop, empty, host, kernel, memory, os, shell, term, terminal, title, uptime, user]
Options:
--no-module-names
Whether to hide the module names
-l, --logo <LOGO>
Path to text file with ascii art to use as the logo
--no-logo
Whether to hide the logo
--padding-before <PADDING_BEFORE>
Padding before the fetch [default: 2]
--padding-between <PADDING_BETWEEN>
Padding between the logo and the text [default: 2]
-r, --raw
Only print raw module output (same as `--no-logo --no-module-names --padding-before 0`, takes precedence over those args)
-h, --help
Print help
-V, --version
Print version
性能
nxfetch 0.2.0 已使用 hyperfine 测试。
您可以通过运行以下命令测试 nxfetch 与其他流行获取器的性能
nix run .#benchmark
$ nix run .#benchmark
Benchmark 1: nxfetch
Time (mean ± σ): 3.8 ms ± 0.4 ms [User: 0.7 ms, System: 2.2 ms]
Range (min … max): 2.2 ms … 6.5 ms 1132 runs
Benchmark 2: afetch
Time (mean ± σ): 5.9 ms ± 0.5 ms [User: 3.2 ms, System: 2.6 ms]
Range (min … max): 2.9 ms … 11.1 ms 561 runs
Benchmark 3: bunnyfetch
Time (mean ± σ): 4.7 ms ± 0.4 ms [User: 1.6 ms, System: 3.0 ms]
Range (min … max): 3.0 ms … 7.4 ms 764 runs
Benchmark 4: fastfetch
Time (mean ± σ): 47.1 ms ± 4.9 ms [User: 17.5 ms, System: 20.8 ms]
Range (min … max): 39.6 ms … 58.4 ms 60 runs
Benchmark 5: inxi
Time (mean ± σ): 620.3 ms ± 9.0 ms [User: 163.5 ms, System: 98.7 ms]
Range (min … max): 609.5 ms … 637.9 ms 10 runs
Benchmark 6: neofetch
Time (mean ± σ): 545.1 ms ± 50.4 ms [User: 245.4 ms, System: 197.9 ms]
Range (min … max): 473.6 ms … 620.8 ms 10 runs
Benchmark 7: pfetch
Time (mean ± σ): 139.8 ms ± 18.9 ms [User: 66.1 ms, System: 33.2 ms]
Range (min … max): 107.3 ms … 172.7 ms 25 runs
Benchmark 8: profetch
Time (mean ± σ): 3.9 ms ± 0.6 ms [User: 1.6 ms, System: 1.8 ms]
Range (min … max): 1.8 ms … 5.7 ms 732 runs
Benchmark 9: yafetch
Time (mean ± σ): 164.6 ms ± 29.5 ms [User: 62.9 ms, System: 28.6 ms]
Range (min … max): 130.1 ms … 239.8 ms 20 runs
Summary
nxfetch ran
1.03 ± 0.20 times faster than profetch
1.24 ± 0.19 times faster than bunnyfetch
1.57 ± 0.22 times faster than afetch
12.54 ± 1.96 times faster than fastfetch
37.26 ± 6.64 times faster than pfetch
43.88 ± 9.37 times faster than yafetch
145.28 ± 21.58 times faster than neofetch
165.32 ± 19.36 times faster than inxi
更多示例
nxfetch --no-logo
nxfetch --raw uptime
12h1m40s
许可证
此存储库采用 GPL-3.0-or-later 许可证。
依赖关系
~3–13MB
~117K SLoC