updated README and some minor code changes

This commit is contained in:
shibedrill 2023-10-31 11:14:28 -04:00
parent 425325c8f3
commit e9c2621084
3 changed files with 27 additions and 28 deletions

BIN
.Cargo.toml.kate-swp Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
# oxidefetch 1.4.4
# oxidefetch 1.4.5
Fully cross platform Neofetch clone written in Rust. Up to 25 times faster than Neofetch!
![alt text](image.png "Example output of OxideFetch on a WSL2 Arch Linux host")
@ -8,8 +8,7 @@ Neofetch, being a BASH script, has a few downsides in my opinion.
1: It's slow.
2: It only works on platforms which have the BASH shell.
3: It's kinda big, and I like having more compact info.
As such, I wrote OxideFetch. How cool is that? It displays your information in a manner that's compact, cross-platform, and BLAZINGLY fast.
I've measured speeds of up to 25 times faster than normal Neofetch on WSL2.
As such, I wrote OxideFetch. How cool is that? It displays your information in a manner that's compact, cross-platform, and BLAZINGLY fast. I've measured speeds of up to 25 times faster than normal Neofetch on WSL2.
### Special Thanks
The most heartfelt of thanks goes out to NamedNeon, who contributed the code to perform terminal detection.
@ -21,8 +20,8 @@ OxideFetch can display all of the following information:
- Operating system name, symbol, and matching color
- Kernel version
- Uptime
- Shell
- Terminal
- Shell
- Terminal
- CPU
- GPU
- Memory
@ -35,28 +34,26 @@ Currently, only Windows (x86) and Linux (x86) have binaries available. If you wa
### Dependencies
#### Build/Install
To build Oxidefetch, you need Cargo. You can use Cargo to automatically build and install it like so:
```cargo install --git https://github.com/shibedrill/oxidefetch```.
From there, it *should* be in your PATH. If not, add ```source ~/.cargo/env``` to your profile, or add ```~/.cargo/bin``` to your $PATH. If you do not already have Cargo installed
on your system, you can do so by installing Rustup- either via the [instructions on their website](https://doc.rust-lang.org/cargo/getting-started/installation.html "instructions on their website") or via your system package manager.
`cargo install --git https://github.com/shibedrill/oxidefetch`. (Alternatively, you can get it from the Crates repos, using `cargo install oxidefetch`. But it might be slightly out of date.) From there, it *should* be in your `$PATH`. If not, add `source ~/.cargo/env` to your profile, or add `~/.cargo/bin` to your `$PATH`. If you do not already have Cargo installed on your system, you can do so by installing Rustup- either via the [instructions on their website](https://doc.rust-lang.org/cargo/getting-started/installation.html "instructions on their website") or via your system package manager. You will also probably need a C compiler and a build system- most likely CMake or GNU Make. You will be prompted to install these if they're not found during compilation.
#### Runtime
There's only a couple runtime dependencies for this project.
1: ```sh``` shell installed for GPU detection on *nix systems.
2: ```lspci``` installed for GPU detection on *nix systems.
1: `sh` shell installed for GPU detection on \*nix systems.
2: `lspci` installed for GPU detection on \*nix systems.
(If either of these above dependencies are absent, chances are the GPU field will simply not show up. It won't crash or anything.
GPU detection runs on Windows without any dependencies.)
3: Nerd fonts symbols are used in the output. Install a patched font on your system, or patch an already installed font.
### How you can help with the project
I need to verify the output of the OS information detection libraries I'm pulling in. To do this, I need the help of people with varying types of systems. I've tested a few, but there's some I'm unable to test. To help, you can kindly clone this repo, and inside the folder, run ```cargo test -- --nocapture```, and send the resultant ```test_output.txt``` file to my noreply email address, or directly to me on Discord at ```@shibedrill```. This program does NOT collect information regarding your real name, IP, location, hardware serial numbers, etc. You can look at the file it generates to be sure- it's all plaintext, babey.
I need to verify the output of the OS information detection libraries I'm pulling in. To do this, I need the help of people with varying types of systems. I've tested a few, but there's some I'm unable to test. To help, you can kindly clone this repo, and inside the folder, run `cargo test -- --nocapture`, and send the resultant `test_output.txt` file to my noreply email address, or directly to me on Discord at `@shibedrill`. This program does NOT collect information regarding your real name, IP, location, hardware serial numbers, etc. You can look at the file it generates to be sure- it's all plaintext, babey.
#### Tested distributions/platforms:
- Alma Linux
- Alpine Linux
- Arch Linux
- CentOS
- Debian
- Debian GNU/Linux
- Fedora
- Gentoo
- Kali Linux
- Kali GNU/Linux
- Linux Mint
- openSUSE Leap
- openSUSE Tumbleweed
@ -73,21 +70,22 @@ No weird quirks to report at this time.
- Add support for user configurability for entries (whether or not an entry shows, its color, units for memory and time)
- Add process count detection
- Refactor logic for cleaner code
- Edit *nix GPU detection to include GPUs that do not include "VGA Compatible Controller" in the name
- Edit \*nix GPU detection to include GPUs that do not include `VGA Compatible Controller` in the name
#### Future:
- Add host system name detection such as "Windows Subsystem for Linux", "IdeaPad 3", "Dell Optiplex", etc.
- Add package count/package manager detection
- Crosstest on more distributions to verify `sys.name()` outputs
- Refactor GPU detection logic into separate crate, remove dependencies on `sh` and `lspci`
- Refactor GPU detection logic into separate crate, remove dependencies on `sh` and `lspci`, and put any platform-specific code in separate files (This is slated for the 2.0.0 release. If you want to help accelerate this effort, consider contributing to [libpci-rs](https://github.com/namedneon/libpci-rs).)
#### Distant future:
- More extensible user configuration for entry formatting
- Separate all information-getting logic into a new Fetch crate, allowing people to make their own fetch programs using a unified cross-platform API
### Changelog
**1.0.0:** Official full stable release
**1.0.1:** Fixed distro name for Debian GNU/Linux. Logo & color works now.
**1.1.0:** Refactored some poorly written typing, and added support for memory.
**1.1.1:** Made sure that linux system detection won't fail if Linux has a capital L.
**1.1.2:** Replaced *nix dependency on ```bash``` with dependency on ```sh```.
**1.1.2:** Replaced *nix dependency on `bash` with dependency on `sh`.
**1.2.0:** Allowed users to enable field titles as a compile-time feature. Tentative fix for GPU display issues on Linux.
**1.2.1:** Stable fix for GPU display quirks.
**1.2.2:** All GPUs should print in their own lines.
@ -98,6 +96,7 @@ No weird quirks to report at this time.
**1.4.2:** Updated colors and logos of a few distros. They will now display correctly.
**1.4.3:** Removed newline print before information. This should be up to the user to print, using their shell profile.
**1.4.4:** Fixed an issue where GPUs would all print on one line.
**1.4.5:** Minor changes to system color detection.
### License
This software is covered by the MIT license. See license.txt for details.

View File

@ -257,25 +257,25 @@ impl Information {
}
},
color: match sys
color: String::from(match sys
.name()
.unwrap_or(String::from("Unknown System"))
.as_ref()
// Again, I don't know whether this is what the strings will look like.
// Feel free to fix if it's broken on your system.
{
"Debian GNU/Linux" => String::from("bright red"),
"FreeBSD" => String::from("red"),
"Ubuntu" => String::from("orange"),
"Arch Linux" | "Windows" | "PopOS" => String::from("bright cyan"),
"Fedora Linux" | "Kali GNU/Linux" | "Alpine Linux" => String::from("bright blue"),
"openSUSE Tumbleweed" | "openSUSE Leap" | "Linux Mint" | "Android" => String::from("bright green"),
"EndeavourOS" | "Gentoo" | "CentOS Linux" | "CentOS Stream" => String::from("purple"),
"iOS" | "macOS" | "ElementaryOS" => String::from("bright white"),
"AlmaLinux" => String::from("yellow"),
"Debian GNU/Linux" => "bright red",
"FreeBSD" => "red",
"Ubuntu" => "orange",
"Arch Linux" | "Windows" | "PopOS" => "bright cyan",
"Fedora Linux" | "Kali GNU/Linux" | "Alpine Linux" => "bright blue",
"openSUSE Tumbleweed" | "openSUSE Leap" | "Linux Mint" | "Android" => "bright green",
"EndeavourOS" | "Gentoo" | "CentOS Linux" | "CentOS Stream" => "purple",
"iOS" | "macOS" | "ElementaryOS" => "bright white",
"AlmaLinux" => "yellow",
_ => String::from("bright white"),
},
_ => "bright white",
}),
}
}
}