4 releases (2 breaking)
0.3.0 | Aug 4, 2024 |
---|---|
0.2.1 | Jul 29, 2024 |
0.2.0 | Jul 29, 2024 |
0.1.2 | Jul 29, 2024 |
#588 in Filesystem
23 downloads per month
80KB
719 lines
nxfetch
A minimal, fast and batteries included fetcher!
nxfetch
Installation
Cargo
cargo install --git https://git.sr.ht/~sntx/nxfetch --locked
Cargo (manual)
git clone https://git.sr.ht/~sntx/nxfetch && cd nxfetch
cargo install --path . --locked
Nix Shell
nix shell sourcehut:~sntx/nxfetch
Usage
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
Performance
nxfetch 0.2.0 has been tested with hyperfine.
You can test nxfetch against other popular fetchers by running:
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
Further Examples
nxfetch --no-logo
nxfetch --raw uptime
12h1m40s
License
This repository is GPL-3.0-or-later licensed.
Dependencies
~3–13MB
~117K SLoC