Compare commits

...

10 Commits

Author SHA1 Message Date
shibedrill
5a50f9c444 Refactored stuff with Clippy
Some checks failed
Rust / build (macos-latest) (push) Waiting to run
Rust / build (windows-latest) (push) Waiting to run
Rust / build (ubuntu-latest) (push) Failing after 20s
2024-01-31 14:42:59 -05:00
Shibe Drill
b58cc69828
Updated list of precompiled binaries 2023-11-28 15:44:10 -05:00
Shibe Drill
a1222fed07
fix markdown 2023-11-28 15:42:44 -05:00
shibedrill
b4f9612902 Mentioned an undocumented feature 2023-11-28 15:39:38 -05:00
shibedrill
e7f4c4b2a7 Fixed repeated info in readme 2023-11-28 15:32:32 -05:00
shibedrill
7df7f0dd09 fixed image lacking a new feature bc I forgot to update my own program 2023-11-27 22:59:09 -05:00
shibedrill
8bdb2855ad Fixed ummmm repo url 2023-11-27 22:18:42 -05:00
shibedrill
22f62daf59 changed image 2023-11-27 21:40:25 -05:00
Shibe Drill
853c1cd074
stupid markdown formatting GRAAHHH 2023-11-13 11:37:49 -05:00
shibedrill
5a5e31d79f Fixed readme version 2023-11-11 15:06:49 -05:00
6 changed files with 35 additions and 29 deletions

2
Cargo.lock generated
View File

@ -348,7 +348,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "oxidefetch"
version = "1.4.7"
version = "1.4.8"
dependencies = [
"byte-unit",
"chrono",

View File

@ -1,11 +1,12 @@
[package]
name = "oxidefetch"
description = "A fast, cross platform Fetch program for your terminal"
version = "1.4.7"
version = "1.4.8"
edition = "2021"
authors = [ "NamedNeon", "shibedrill" ]
license = "MIT"
readme = "README.md"
repository = "https://github.com/shibedrill/oxidefetch"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -32,4 +33,4 @@ codegen-units = 1
panic = "abort"
[features]
field-titles = []
field-titles = []

View File

@ -1,4 +1,4 @@
# oxidefetch 1.4.6
# oxidefetch 1.4.8
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")
@ -21,20 +21,26 @@ OxideFetch can display all of the following information:
- Kernel version
- Uptime
- Shell
- Terminal
- Terminal emulator/console
- CPU
- GPU
- Memory
- Terminal emulator
- Memory
Also, the field-titles feature can be enabled at compile-time, which will display the name of each field in white before the information within that field. By default, it is disabled.
### Installation
Download a binary for your platform, and place it in your PATH.
Currently, only Windows (x86) and Linux (x86) have binaries available. If you want a binary for another platform, you will have to follow the instructions to build from source.
Download a binary for your platform, and place it in your `$PATH`.
Currently, only Windows (x86_64, gnu/msvc) and Linux (x86_64/aarch64, gnu/musl) have binaries available. If you want a binary for another platform, you will have to follow the instructions to build from source.
### 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`. (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.
To build Oxidefetch, you need Cargo. 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/C++ compiler and a build system- most likely CMake and Visual Studio Build Tools, or GNU Make and the GNU compiler collection. You will be prompted to install these if they're not found during compilation.
You can use Cargo, once it's installed, to automatically build and install Oxidefetch like so:
`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`.
#### Runtime
There's only a couple runtime dependencies for this project.
1: `sh` shell installed for GPU detection on \*nix systems.
@ -44,7 +50,8 @@ 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. Also, consider contributing to [libpci-rs](https://github.com/namedneon/libpci-rs), which will eventually take responsibility for the GPU detection.
#### Tested distributions/platforms:
- Alma Linux
- Alpine Linux
@ -97,8 +104,9 @@ No weird quirks to report at this time.
**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. Removed all warnings.
**1.4.6:** Cargo formatting applied to all files. Mild string reformatting in print statements.
**1.4.7:** Removed several `unwrap()` calls. Changed debug output to serialize to RON.
**1.4.6:** Cargo formatting applied to all files. Mild string reformatting in print statements.
**1.4.7:** Removed several `unwrap()` calls. Changed debug output to serialize to RON.
**1.4.8:** Applied Clippy suggestions. Added stuff to README.
### License
This software is covered by the MIT license. See license.txt for details.

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View File

@ -28,10 +28,10 @@ use crate::terminal::get_terminal;
use byte_unit::*;
use chrono::*;
use colored::*;
use compound_duration;
use std::env;
use sysinfo::*;
use whoami;
#[cfg(test)]
use serde::Serialize;
@ -141,7 +141,7 @@ impl Information {
shell: {
let var = env::var("SHELL");
if let Ok(var_ok) = var {
Some(format!("{}", var_ok.split('/').last().unwrap()))
Some(var_ok.split('/').last().unwrap().to_string())
} else {
None
}

View File

@ -56,16 +56,13 @@ macro_rules! match_env_to_terminal {
pub fn get_terminal() -> Option<String> {
// Match Apple terminals.
match env::var("TERM_PROGRAM") {
Ok(f) => {
return match f.as_str() {
"iTerm.app" => Some("iTerm2".to_string()),
"Terminal.app" => Some("Apple Terminal".to_string()),
"Hyper.app" => Some("Hyper".to_string()),
_ => None,
};
}
Err(_) => (),
if let Ok(f) = env::var("TERM_PROGRAM") {
return match f.as_str() {
"iTerm.app" => Some("iTerm2".to_string()),
"Terminal.app" => Some("Apple Terminal".to_string()),
"Hyper.app" => Some("Hyper".to_string()),
_ => None,
};
};
match_env_to_terminal!("ConEmuPID", "ConEmu");
@ -79,7 +76,7 @@ pub fn get_terminal() -> Option<String> {
Ok(f) => f,
Err(_) => "".to_string(),
};
let shell_name = shell.split("/").last().unwrap();
let shell_name = shell.split('/').last().unwrap();
#[allow(unused_assignments)]
let mut name: Option<String> = None;
@ -137,7 +134,7 @@ pub fn get_terminal() -> Option<String> {
return match name {
Some(f) => {
// Remove the file extension.
let mut res = f.split(".").nth(0).unwrap().to_string();
let mut res = f.split('.').next().unwrap().to_string();
// Try to get a "prettier name".
if PRETTY_NAMES.contains_key(res.as_str()) {