Fast (~1ms execution time) and somewhat(?) minimal fetch program written in Rust.
### Table of Contents
* [Preface](#preface)
* [Things to Know](#things-to-know)
* [Installation](#installation)
* [Usage](#usage)
* [Screenshots](#screenshots)
* [Benchmarks](#benchmarks)
* [License](#license)
* [Changelog](#changelog)
### Preface
**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.
**Another notice:** If you show off `rsfetch` anywhere, please let [/u/Valley6660](https://www.reddit.com/user/Valley6660/) know or open up an issue here.
He'd absolutely love to see `rsfetch` used by someone other than himself.
And if you share, there's a very good possibility of your screenshot being included in the README!
(I'm totally not trying to bribe people into using it, shhhhhhh.)
### Things to Know
1. 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](CHANGELOG.md).~~
2. These are the current package managers supported. If I missed any, please report it in [this](https://github.com/rsfetch/rsfetch/issues/28) issue.
- pacman
- apt
- xbps
- dnf
- eopkg
- pkg
- rpm
- apk
- portage (note: requires portage-utils to be installed as it uses qlist)
- cargo
- pip
3. 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.
### Installation
I have prebuilt binaries in the releases tab for people who don't want to build from source, otherwise you can do this.
#### Prerequisites
- the Rust compiler toolchain
- **GNU** Make (makefile not compatible with `bmake`!)
You have two methods to build from source:
##### make
(Choose either 3 or 4, but don't do both.)
1. Clone the repository
2. `cd rsfetch`
3. `sudo make install`
4. Or use `make DESTDIR="/home/$USER" PREFIX=".cargo/" install` to install to `$HOME/.cargo/bin`
Uninstall with `sudo make uninstall`.
##### cargo
1. Clone the repository
2. `cd rsfetch`
3. `cargo install --path .`
4. `sudo cp rsfetch.1 /usr/share/man/man1/` (for optional manpage, skip if unwanted)
Uninstall with `cargo uninstall rsfetch`
#### distro repos
[![Packaging status](https://repology.org/badge/vertical-allrepos/rsfetch.svg)](https://repology.org/project/rsfetch/versions)
If you use an Arch-based distro, you can use either of the following AUR packages:
- [rsfetch-git](https://aur.archlinux.org/packages/rsfetch-git/) (This requires Rust as it builds from source.)
- [rsfetch-bin](https://aur.archlinux.org/packages/rsfetch-bin/) (This grabs the latest binary from releases.)
If you are on BSD, it is in Fresh Ports (thanks to whoever maintains that package, I was ecstatic to see it):
- [rsfetch](https://www.freshports.org/sysutils/rsfetch/) (Requires Rust and pkgconf as it builds from source.)
If you are on Gentoo, you can install it from the overlay I co-created:
1. Install [p6nc-overlay](https://github.com/p6nc/overlay)
2. Make sure repos and overlays are synced: `sudo emerge --sync`
3. `sudo emerge -atv rsfetch`
#### cargo
If you already have `rust` and `cargo` setup, you can install it with:
`cargo install rsfetch`
If you want the manpage:
`sudo curl -sSL https://raw.githubusercontent.com/rsfetch/rsfetch/master/rsfetch.1 -o /usr/share/man/man1/rsfetch.1`
### Usage
```
rsfetch 2.0.0
An fetch tool for Linux. Fast (~1ms execution time) and somewhat(?) minimal.
All options are off by default.
Accepted values for the package manager are "pacman", "apt", "xbps", "dnf", "pkg", "eopkg", "rpm", "apk", "pip",
"portage", and "cargo".
USAGE:
rsfetch [FLAGS] [OPTIONS]
FLAGS:
-P, --cpu Turn CPU information on.
--credits List of past and current contributors for this project.
-d, --distro Turn distro name on.
-e, --editor Turn default editor name on. (Must have $EDITOR/$VISUAL variable set.)
--help Prints help information
-h, --host Turn device name on.
-H, --hostname Turn hostname on.
-i, --ip-address Turn ip address display on.
-k, --kernel Turn kernel version on.
-l, --logo Turn the logo or ascii art on.
-r, --memory Turn memory information on.
-M, --minimal Turn minimal-style output mode on.
-N, --neofetch Turn neofetch-style output mode on.
-b, --no-bold Turn bold for field titles off.
-B, --no-borders Turn borders off.
-c, --no-caps Turn all caps off.
-s, --shell Turn default shell name on.
-t, --terminal Turn terminal name on.
-u, --uptime Turn uptime info on.
-U, --user Turn user name on.
-@, --userat Turn 'user@hostname' style on (only applicable if both 'user' and 'hostname' are enabled!).
-V, --version Prints version information
-w, --wm Turn WM or DE name on.
OPTIONS:
-C, --corners Specify the corner character. Only used when borders are enabled.
-L, --logofile Specify the file from which to read a custom ASCII logo.
-m, --music