Fast (<1ms execution time) and somewhat(?) minimal fetch program written in Rust.
Why I originally made it: I used to use neofetch, ufetch, and aurafetch a lot, but then that got me thinking. I have the skill to make my own script, so why not? At first, it was just a simple BASH script. Then I decided I wanted to try my hand at Rust, as it has interested me for a while. So... here's the end result. I am open to any criticisms you have. After all, I wish to make this better (as well as improve my Rust skills).
Why I want to continue improving this: When this first started out, it was a simple pet project for learning how to code in Rust. Now that I have people helping me with this project, I would love to see this turn into a worthy alternative to neofetch/ufetch/screenfetch. Please, if there's anything that you feel is missing from this, open an issue. I would love to hear people's thoughts on how this is.
If you plan to help, note that indentation is done with 4 spaces. It used to be tabs, but I have been told that spaces are the preferred indentation in the Rust community. Any new changes should be recorded in CHANGELOG.md.
These are the current package managers supported. If I missed any, please report it in this issue.
The music info obtains the info from a locally running mpd
server using mpc
. If you want more music sources supported, let me know by opening up an issue.
I have prebuilt binaries in the releases tab for people who don't want to build from source, otherwise you can do this.
cd rsfetch; make; sudo make install
Uninstall with sudo make uninstall
.
Optionally, if you use a Arch-based distro, you can use either of the following AUR packages: - rsfetch-git (This requires Rust as it builds from source.) - rsfetch-bin (This grabs the latest binary from releases.)
~~I just switched over to Gentoo a few days ago, so whenever I figure out how to make (and share) ebuilds, there will be one released. :)~~ So it turns out that not only am I terrible at pkgbuilds, but also ebuilds. If anyone could make one for me, that would be amazing.
Help
Default Fetch
Default (Minimal Mode) Fetch
My Preference of Options
Here's a detailed benchmark, with rsfetch versus Neofetch and ScreenFetch:
Note: All programs are using default options, no flags or config files were used.
$ hyperfine "rsfetch" "neofetch" "screenfetch"
``` Benchmark #1: rsfetch Time (mean ± σ): 1.3 ms ± 0.0 ms [User: 0.6 ms, System: 0.9 ms] Range (min … max): 1.2 ms … 1.6 ms 1314 runs
Benchmark #2: neofetch Time (mean ± σ): 125.1 ms ± 2.2 ms [User: 84.7 ms, System: 45.8 ms] Range (min … max): 123.4 ms … 134.4 ms 22 runs
Benchmark #3: screenfetch Time (mean ± σ): 141.4 ms ± 1.3 ms [User: 87.3 ms, System: 65.0 ms] Range (min … max): 139.2 ms … 145.2 ms 21 runs
Summary
'rsfetch' ran
96.09 ± 3.77 times faster than 'neofetch'
108.56 ± 3.93 times faster than 'screenfetch'
``
As you can see,
rsfetch` is the clear winner.
And yes, you saw right. Execution time was <1ms on average! Crazy fast.