Compare commits
10 Commits
b75adff1c8
...
5a50f9c444
Author | SHA1 | Date | |
---|---|---|---|
|
5a50f9c444 | ||
|
b58cc69828 | ||
|
a1222fed07 | ||
|
b4f9612902 | ||
|
e7f4c4b2a7 | ||
|
7df7f0dd09 | ||
|
8bdb2855ad | ||
|
22f62daf59 | ||
|
853c1cd074 | ||
|
5a5e31d79f |
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -348,7 +348,7 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "oxidefetch"
|
name = "oxidefetch"
|
||||||
version = "1.4.7"
|
version = "1.4.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "oxidefetch"
|
name = "oxidefetch"
|
||||||
description = "A fast, cross platform Fetch program for your terminal"
|
description = "A fast, cross platform Fetch program for your terminal"
|
||||||
version = "1.4.7"
|
version = "1.4.8"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = [ "NamedNeon", "shibedrill" ]
|
authors = [ "NamedNeon", "shibedrill" ]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
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
|
# 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"
|
panic = "abort"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
field-titles = []
|
field-titles = []
|
||||||
|
30
README.md
30
README.md
@ -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!
|
Fully cross platform Neofetch clone written in Rust. Up to 25 times faster than Neofetch!
|
||||||
|
|
||||||

|

|
||||||
@ -21,20 +21,26 @@ OxideFetch can display all of the following information:
|
|||||||
- Kernel version
|
- Kernel version
|
||||||
- Uptime
|
- Uptime
|
||||||
- Shell
|
- Shell
|
||||||
- Terminal
|
- Terminal emulator/console
|
||||||
- CPU
|
- CPU
|
||||||
- GPU
|
- GPU
|
||||||
- Memory
|
- Memory
|
||||||
- Terminal emulator
|
|
||||||
|
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
|
### Installation
|
||||||
Download a binary for your platform, and place it in your PATH.
|
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.
|
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
|
### Dependencies
|
||||||
#### Build/Install
|
#### Build/Install
|
||||||
To build Oxidefetch, you need Cargo. You can use Cargo to automatically build and install it like so:
|
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.
|
||||||
`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.
|
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
|
#### Runtime
|
||||||
There's only a couple runtime dependencies for this project.
|
There's only a couple runtime dependencies for this project.
|
||||||
1: `sh` shell installed for GPU detection on \*nix systems.
|
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.
|
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
|
### 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:
|
#### Tested distributions/platforms:
|
||||||
- Alma Linux
|
- Alma Linux
|
||||||
- Alpine 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.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.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.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.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.7:** Removed several `unwrap()` calls. Changed debug output to serialize to RON.
|
||||||
|
**1.4.8:** Applied Clippy suggestions. Added stuff to README.
|
||||||
|
|
||||||
### License
|
### License
|
||||||
This software is covered by the MIT license. See license.txt for details.
|
This software is covered by the MIT license. See license.txt for details.
|
||||||
|
BIN
image.png
BIN
image.png
Binary file not shown.
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 142 KiB |
@ -28,10 +28,10 @@ use crate::terminal::get_terminal;
|
|||||||
use byte_unit::*;
|
use byte_unit::*;
|
||||||
use chrono::*;
|
use chrono::*;
|
||||||
use colored::*;
|
use colored::*;
|
||||||
use compound_duration;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use sysinfo::*;
|
use sysinfo::*;
|
||||||
use whoami;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
@ -141,7 +141,7 @@ impl Information {
|
|||||||
shell: {
|
shell: {
|
||||||
let var = env::var("SHELL");
|
let var = env::var("SHELL");
|
||||||
if let Ok(var_ok) = var {
|
if let Ok(var_ok) = var {
|
||||||
Some(format!("{}", var_ok.split('/').last().unwrap()))
|
Some(var_ok.split('/').last().unwrap().to_string())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -56,16 +56,13 @@ macro_rules! match_env_to_terminal {
|
|||||||
|
|
||||||
pub fn get_terminal() -> Option<String> {
|
pub fn get_terminal() -> Option<String> {
|
||||||
// Match Apple terminals.
|
// Match Apple terminals.
|
||||||
match env::var("TERM_PROGRAM") {
|
if let Ok(f) = env::var("TERM_PROGRAM") {
|
||||||
Ok(f) => {
|
return match f.as_str() {
|
||||||
return match f.as_str() {
|
"iTerm.app" => Some("iTerm2".to_string()),
|
||||||
"iTerm.app" => Some("iTerm2".to_string()),
|
"Terminal.app" => Some("Apple Terminal".to_string()),
|
||||||
"Terminal.app" => Some("Apple Terminal".to_string()),
|
"Hyper.app" => Some("Hyper".to_string()),
|
||||||
"Hyper.app" => Some("Hyper".to_string()),
|
_ => None,
|
||||||
_ => None,
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
Err(_) => (),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match_env_to_terminal!("ConEmuPID", "ConEmu");
|
match_env_to_terminal!("ConEmuPID", "ConEmu");
|
||||||
@ -79,7 +76,7 @@ pub fn get_terminal() -> Option<String> {
|
|||||||
Ok(f) => f,
|
Ok(f) => f,
|
||||||
Err(_) => "".to_string(),
|
Err(_) => "".to_string(),
|
||||||
};
|
};
|
||||||
let shell_name = shell.split("/").last().unwrap();
|
let shell_name = shell.split('/').last().unwrap();
|
||||||
|
|
||||||
#[allow(unused_assignments)]
|
#[allow(unused_assignments)]
|
||||||
let mut name: Option<String> = None;
|
let mut name: Option<String> = None;
|
||||||
@ -137,7 +134,7 @@ pub fn get_terminal() -> Option<String> {
|
|||||||
return match name {
|
return match name {
|
||||||
Some(f) => {
|
Some(f) => {
|
||||||
// Remove the file extension.
|
// 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".
|
// Try to get a "prettier name".
|
||||||
if PRETTY_NAMES.contains_key(res.as_str()) {
|
if PRETTY_NAMES.contains_key(res.as_str()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user