Skip to content

Commit

Permalink
added new configurations options and temperatures for cpu and gpu, ve…
Browse files Browse the repository at this point in the history
…rsion 0.5.7
  • Loading branch information
charklie committed May 17, 2024
1 parent daf92b8 commit a4d61eb
Show file tree
Hide file tree
Showing 7 changed files with 292 additions and 75 deletions.
52 changes: 26 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rsftch"
version = "0.5.6"
version = "0.5.7"
edition = "2021"
authors = ["Charklie charliejohanid@gmail.com"]
license = "MIT"
description = "Lightning fast hardware fetch tool written in rust."
description = "Aesthetically pleasing and lightning fast hardware fetch tool written in rust with configuration."
readme = "README.md"
repository = "https://github.com/charklie/rsftch"
keywords = ["fetch", "rust", "neofetch"]
Expand Down
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The info configuration should be located at `~/.config/rsftch/info.json`, and it
```json
{
"info1": [ "os", "kernel", "packs" ],
"info2": [ "user", "host" ],
"info2": [ "user", "host", "de" ],
"info3": [ "cpu", "gpu", "mem" ]
}
```
Expand All @@ -98,6 +98,8 @@ This is a very simple example but all the options are as follows:
- mem / memory
- uptime
- res / display / resolution
- time / timezone
- disk / diskusage

#### Colors
The color configuration should be located at `~/.config/rsftch/colors.json`, and it could look something like this:
Expand Down Expand Up @@ -150,18 +152,20 @@ File an issue.

### Usage
```
Usage: rsftch [OPTION...] [OVERRIDE] [MARGIN] [CONFIG FILE(s)]
-h, --help, --usage Bring up this menu
-o, --override Overrides distribution, affects ASCII and "distro" info.
-m, --margin Add margin to the info sections, default 1.
-c, --color-config Specify another color config file, to be used instead of the default one.
-i, --info-config Specify another info config file, to be used instead of the default one.
--ignore-color-config Ignores the custom color config and uses the default one.
--ignore-info-config Ignores the custom info config and uses the default one.
--ignore-config Ignores both configs and uses the default ones.
--info Only prints the value of the following arguments info, for example
"rsftch --info distro" would output: "EndeavourOS"
Usage: rsftch [OPTION...] [OVERRIDE] [MARGIN] [CONFIG FILE(s)] [INFO]
-h, --help, --usage Bring up this menu.
-v, --version Print version number.
-o, --override Overrides distribution, affects ASCII and "distro" info. Running without
an argument prints all possible options.
-m, --margin Add margin to the info sections, default 1.
-c, --color-config Specify another color config file, to be used instead of the default one.
-i, --info-config Specify another info config file, to be used instead of the default one.
--ignore-color-config Ignores the custom color config and uses the default one.
--ignore-info-config Ignores the custom info config and uses the default one.
--ignore-config Ignores both configs and uses the default ones.
--info Only prints the value of the following arguments info, for example
`rsftch --info distro` would output: "EndeavourOS".
Info config is located at: ~/.config/rsftch/info.json
Color config is located at: ~/.config/rsftch/colors.json
Expand All @@ -176,11 +180,8 @@ Color config is located at: ~/.config/rsftch/colors.json
### Compatability
Currently Rsftch only works on GNU/Linux, (most) BSD distributions and (probably) Mac OS.

### Note
(If) You're wondering why I didn't use clap for command-line argument parsing, I've personally found it slow, and if I do get it to be somewhat fast, its too easy and first rsftch was meant to be a project for me to learn rust so I tried to complicate (some) things and making them in pure rust instead of using a crate to do it for me.

### Contribrutions
All PRs or just an issue recommending an issue is always welcome. Keep in mind that I've only been programming in Rust for circa 2 months, so don't be harsh.
All PRs or just an issue recommending an enhancement is always welcome.

### Thanks
Thank you to:
Expand All @@ -190,6 +191,7 @@ Thank you to:
### Todo
- [X] Configuration via JSON
- [X] Version command
- [ ] Optimizations (?)
- [ ] Automatic ASCII generation
- [ ] Add TOML / JSONC support
- [ ] Add support for more info sections (?)
Expand Down
2 changes: 1 addition & 1 deletion src/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn get_distro_ascii(overriden_ascii: Option<String>) -> String {
ascii!(overriden_ascii, "debian", " ___ __ _ \n / _ \\___ / / (_)__ ____ \n / // / -_) _ \\/ / _ `/ _ \\\n/____/\\__/_.__/_/\\_,_/_//_/"),
ascii!(overriden_ascii, "fedora", " ____ __ \n / __/__ ___/ /__ _______ _\n / _// -_) _ / _ \\/ __/ _ `/\n/_/ \\__/\\_,_/\\___/_/ \\_,_/"),
ascii!(overriden_ascii, "endeavour", " ____ __ \n / __/__ ___/ /__ ___ __ _____ __ ______\n / _// _ \\/ _ / -_) _ `/ |/ / _ \\/ // / __/\n/___/_//_/\\_,_/\\__/\\_,_/|___/\\___/\\_,_/_/"),
ascii!(overriden_ascii, "void", " _ __ _ __\n | | / /__ (_)__/ /\n | |/ / _ \\/ / _ / \n |___/\\___/_/\\_,_/"),
ascii!(overriden_ascii, "void", " _ __ _ __\n | | / /__ (_)__/ /\n | |/ / _ \\/ / _ / \n |___/\\___/_/\\_,_/"),
ascii!(overriden_ascii, "ubuntu", " __ ____ __ \n / / / / / __ _____ / /___ __\n/ /_/ / _ \\/ // / _ \\/ __/ // /\n\\____/_.__/\\_,_/_//_/\\__/\\_,_/"),
ascii!(overriden_ascii, "suse", " ____ ____ \n / __ \\___ ___ ___ / __/_ _____ ___ \n/ /_/ / _ \\/ -_) _ \\_\\ \\/ // (_-</ -_)\n\\____/ .__/\\__/_//_/___/\\_,_/___/\\__/ \n /_/"),
ascii!(overriden_ascii, "rasp", " ___ __ _ \n / _ \\___ ____ ___ / / (_)__ ____ \n / , _/ _ `(_-</ _ \\/ _ \\/ / _ `/ _ \\\n/_/|_|\\_,_/___/ .__/_.__/_/\\_,_/_//_/\n /_/"),
Expand Down
Loading

0 comments on commit a4d61eb

Please sign in to comment.