├── .gitignore ├── src ├── main.rs ├── logos │ ├── macos │ ├── windows │ ├── debian_linux │ ├── arch_linux │ └── ubuntu_linux ├── utils.rs ├── cli.rs ├── modules.rs └── config.rs ├── .github └── workflows │ ├── rust.yml │ ├── release_plz.yaml │ └── upload_binaries.yaml ├── Cargo.toml ├── LICENSE ├── windows_default.toml ├── config.toml ├── README.md └── CHANGELOG.md /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | .DS_Store 4 | Dockerfile 5 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![warn(clippy::pedantic)] 2 | mod cli; 3 | mod config; 4 | mod modules; 5 | mod utils; 6 | #[macro_use] 7 | extern crate serde_derive; 8 | use config::Config; 9 | fn main() { 10 | Config::from_config(Config::path()).print(); 11 | } 12 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | env: 8 | CARGO_TERM_COLOR: always 9 | 10 | jobs: 11 | build: 12 | runs-on: ${{ matrix.os }} 13 | 14 | strategy: 15 | matrix: 16 | os: [macos-latest, ubuntu-latest, windows-latest] 17 | 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v2 21 | 22 | - name: Install latest rust toolchain 23 | uses: actions-rs/toolchain@v1 24 | with: 25 | profile: minimal 26 | toolchain: stable 27 | default: true 28 | override: true 29 | 30 | - name: Test 31 | run: cargo test -- --nocapture 32 | -------------------------------------------------------------------------------- /.github/workflows/release_plz.yaml: -------------------------------------------------------------------------------- 1 | name: Release-plz 2 | 3 | permissions: 4 | pull-requests: write 5 | contents: write 6 | 7 | on: 8 | push: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | release-plz: 14 | name: Release-plz 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout repository 18 | uses: actions/checkout@v4 19 | with: 20 | fetch-depth: 0 21 | - name: Install Rust toolchain 22 | uses: dtolnay/rust-toolchain@stable 23 | - name: Run release-plz 24 | uses: MarcoIeni/release-plz-action@v0.5 25 | env: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} 28 | -------------------------------------------------------------------------------- /src/logos/macos: -------------------------------------------------------------------------------- 1 |  'c.  2 |  ,xNMM. 3 |  .OMMMMo 4 |  OMMM0, 5 |  .;loddo:' loolloddol;. 6 |  cKMMMMMMMMMMNWMMMMMMMMMM0: 7 |  .KMMMMMMMMMMMMMMMMMMMMMMMWd. 8 |  XMMMMMMMMMMMMMMMMMMMMMMMX. 9 | ;MMMMMMMMMMMMMMMMMMMMMMMM: 10 | :MMMMMMMMMMMMMMMMMMMMMMMM: 11 | .MMMMMMMMMMMMMMMMMMMMMMMMX. 12 |  kMMMMMMMMMMMMMMMMMMMMMMMMWd. 13 |  .XMMMMMMMMMMMMMMMMMMMMMMMMMMk 14 |  .XMMMMMMMMMMMMMMMMMMMMMMMMK. 15 |  kMMMMMMMMMMMMMMMMMMMMMMd 16 |  ;KMMMMMMMWXXWMMMMMMMk. 17 |  .cooc,. .,coo:. 18 | -------------------------------------------------------------------------------- /src/logos/windows: -------------------------------------------------------------------------------- 1 | ################ ################ 2 | ################ ################ 3 | ################ ################ 4 | ################ ################ 5 | ################ ################ 6 | ################ ################ 7 | ################ ################ 8 | 9 | ################ ################ 10 | ################ ################ 11 | ################ ################ 12 | ################ ################ 13 | ################ ################ 14 | ################ ################ 15 | ################ ################ 16 | -------------------------------------------------------------------------------- /src/logos/debian_linux: -------------------------------------------------------------------------------- 1 |  _,met$$$$$gg. 2 |  ,g$$$$$$$$$$$$$$$P. 3 |  ,g$$P" """Y$$.". 4 |  ,$$P' `$$$. 5 | ',$$P ,ggs. `$$b: 6 | `d$$' ,$P"' . $$$ 7 |  $$P d$' , $$P 8 |  $$: $$. - ,d$$' 9 |  $$; Y$b._ _,d$P' 10 |  Y$$. `.`"Y$$$$P"' 11 |  `$$b "-.__ 12 |  `Y$$ 13 |  `Y$$. 14 |  `$$b. 15 |  `Y$$b. 16 |  `"Y$b._ 17 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rocketfetch" 3 | version = "0.7.5" 4 | authors = ["Devan Looches "] 5 | edition = "2021" 6 | include = ["src/**/*"] 7 | license = "MIT" 8 | description = "A WIP command line system information tool written asynchronously in rust for performance with toml file configuration." 9 | repository = "https://github.com/devanlooches/rustfetch" 10 | readme = "README.md" 11 | keywords = ["system", "cli", "fetch", "multithreaded", "multithreading"] 12 | categories = ["command-line-utilities"] 13 | 14 | [dependencies] 15 | any_terminal_size = "0.1.21" 16 | clap = { version = "4.5.10", features = ["derive"] } 17 | console = "0.15.8" 18 | dirs = "5.0.1" 19 | libmacchina = "7.3.0" 20 | regex = "1.10.5" 21 | secfmt = "0.1.1" 22 | serde = "1.0.204" 23 | serde_derive = "1.0.204" 24 | textwrap = "0.16.1" 25 | toml = "0.8.15" 26 | user-error = "1.2.8" 27 | 28 | [dev-dependencies] 29 | pretty_assertions = "1.4.0" 30 | 31 | [profile.release] 32 | opt-level = 3 33 | lto = "fat" 34 | -------------------------------------------------------------------------------- /src/logos/arch_linux: -------------------------------------------------------------------------------- 1 |  -`  2 |  .o+`  3 |  `ooo/  4 |  `+oooo:  5 |  `+oooooo:  6 |  -+oooooo+:  7 |  `/:-:++oooo+:  8 |  `/++++/+++++++:  9 |  `/++++++++++++++:  10 |  `/+++ooooooooooooo/`  11 |  ./ooosssso++osssssso+`  12 |  .oossssso-````/ossssss+`  13 |  -osssssso. :ssssssso.  14 |  :osssssss/ osssso+++.  15 |  /ossssssss/ +ssssooo/-  16 |  `/ossssso+/:- -:/+osssso+-  17 |  `+sso+:-` `.-/+oso:  18 |  `++:. `-/+/ 19 |  .` `/ 20 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | #[macro_export] 2 | macro_rules! handle_error { 3 | ( $err:expr, $err_msg:expr, $help_msg:literal ) => { 4 | if let Ok(v) = $err { 5 | v 6 | } else { 7 | let r = $err.unwrap_err().to_string(); 8 | if r == "" { 9 | UserFacingError::new($err_msg) 10 | .help($help_msg) 11 | .print_and_exit(); 12 | } else { 13 | UserFacingError::new($err_msg) 14 | .help($help_msg) 15 | .reason(r) 16 | .print_and_exit(); 17 | } 18 | unreachable!() 19 | } 20 | }; 21 | ( $err:expr, $err_msg:expr ) => { 22 | if let Ok(v) = $err { 23 | v 24 | } else { 25 | let r = $err.unwrap_err().to_string(); 26 | if r == "" { 27 | UserFacingError::new($err_msg).print_and_exit(); 28 | } else { 29 | UserFacingError::new($err_msg).reason(r).print_and_exit(); 30 | } 31 | unreachable!() 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 devanlooches 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/cli.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use user_error::UserFacingError; 3 | 4 | #[derive(Parser)] 5 | #[command( 6 | about = "A WIP command line system information tool (neofetch) rewritten in rust for performance with toml file configuration." 7 | )] 8 | pub struct Opt { 9 | #[structopt(short, long, name = "FILE", help = "Sets custom configuration file.")] 10 | pub config: Option, 11 | #[structopt( 12 | short, 13 | long, 14 | help = "Set the printing mode. Can be one of `side-block`, `bottom-block`, or `classic`" 15 | )] 16 | pub mode: Option, 17 | #[structopt(long, help = "Disables Line Wrapping")] 18 | pub no_line_wrap: bool, 19 | } 20 | 21 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 22 | #[serde(rename_all = "kebab-case")] 23 | pub enum Mode { 24 | Classic, 25 | SideBlock, 26 | BottomBlock, 27 | } 28 | 29 | impl std::str::FromStr for Mode { 30 | type Err = String; 31 | 32 | fn from_str(s: &str) -> Result { 33 | match s.to_lowercase().as_str() { 34 | "classic" => Ok(Self::Classic), 35 | "side-block" | "sideblock" => Ok(Self::SideBlock), 36 | "bottom-block" | "bottomblock" => Ok(Self::BottomBlock), 37 | v => Err(format!( 38 | "\n{}", 39 | UserFacingError::new("Unable to parse mode string") 40 | .reason(format!("Unknown Mode: {v}")) 41 | .help("Expected one of `side-block`, `bottom-block`, or `classic`") 42 | )), 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /windows_default.toml: -------------------------------------------------------------------------------- 1 | module-order = "user delimiter os host kernel uptime packages cpu" 2 | offset = 4 3 | logo-cmd = "auto" 4 | wrap-lines = true 5 | 6 | [format] 7 | mode = "classic" 8 | top-left-corner-char = "╭" 9 | top-right-corner-char = "╮" 10 | bottom-left-corner-char = "╰" 11 | bottom-right-corner-char = "╯" 12 | horizontal-char = "─" 13 | vertical-char = "│" 14 | padding-left = 1 15 | padding-right = 1 16 | padding-top = 0 17 | 18 | [user] 19 | pre-text-style = "bold.yellow" 20 | pre-text = "" 21 | output-style = "bold.yellow" 22 | separator-style = "white" 23 | separator-char = "@" 24 | 25 | [delimiter] 26 | style = "white" 27 | repeat-num = 0 28 | char = "-" 29 | 30 | [os] 31 | pre-text-style = "bold.yellow" 32 | pre-text = "OS: " 33 | output-style = "white" 34 | 35 | [host] 36 | pre-text-style = "bold.yellow" 37 | pre-text = "Host: " 38 | output-style = "white" 39 | 40 | [kernel] 41 | pre-text-style = "bold.yellow" 42 | pre-text = "Kernel: " 43 | output-style = "white" 44 | 45 | [uptime] 46 | pre-text-style = "bold.yellow" 47 | pre-text = "Uptime: " 48 | output-style = "white" 49 | time-format = "$days days, $hours hours, $minutes minutes" 50 | 51 | [packages] 52 | pre-text-style = "bold.yellow" 53 | pre-text = "Packages: " 54 | output-style = "white" 55 | 56 | [shell] 57 | pre-text-style = "bold.yellow" 58 | pre-text = "Shell: " 59 | output-style = "white" 60 | 61 | [resolution] 62 | pre-text-style = "bold.yellow" 63 | pre-text = "Resolution: " 64 | output-style = "white" 65 | 66 | [desktop-environment] 67 | pre-text-style = "bold.yellow" 68 | pre-text = "Desktop Environment: " 69 | output-style = "white" 70 | 71 | [window-manager] 72 | pre-text-style = "bold.yellow" 73 | pre-text = "Window Manager: " 74 | output-style = "white" 75 | 76 | [terminal] 77 | pre-text-style = "bold.yellow" 78 | pre-text = "Terminal: " 79 | output-style = "white" 80 | 81 | [cpu] 82 | pre-text-style = "bold.yellow" 83 | pre-text = "CPU: " 84 | output-style = "white" 85 | -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- 1 | module-order = "user delimiter os host kernel uptime packages shell resolution desktop-environment window-manager terminal cpu" 2 | offset = 4 3 | logo-cmd = "auto" 4 | wrap-lines = true 5 | 6 | [format] 7 | mode = "classic" 8 | top-left-corner-char = "╭" 9 | top-right-corner-char = "╮" 10 | bottom-left-corner-char = "╰" 11 | bottom-right-corner-char = "╯" 12 | horizontal-char = "─" 13 | vertical-char = "│" 14 | padding-left = 1 15 | padding-right = 1 16 | padding-top = 0 17 | 18 | [user] 19 | pre-text-style = "bold.yellow" 20 | pre-text = "" 21 | output-style = "bold.yellow" 22 | separator-style = "white" 23 | separator-char = "@" 24 | 25 | [delimiter] 26 | style = "white" 27 | repeat-num = 0 28 | char = "-" 29 | 30 | [os] 31 | pre-text-style = "bold.yellow" 32 | pre-text = "OS: " 33 | output-style = "white" 34 | 35 | [host] 36 | pre-text-style = "bold.yellow" 37 | pre-text = "Host: " 38 | output-style = "white" 39 | 40 | [kernel] 41 | pre-text-style = "bold.yellow" 42 | pre-text = "Kernel: " 43 | output-style = "white" 44 | 45 | [uptime] 46 | pre-text-style = "bold.yellow" 47 | pre-text = "Uptime: " 48 | output-style = "white" 49 | time-format = "$days days, $hours hours, $minutes minutes" 50 | 51 | [packages] 52 | pre-text-style = "bold.yellow" 53 | pre-text = "Packages: " 54 | output-style = "white" 55 | 56 | [shell] 57 | pre-text-style = "bold.yellow" 58 | pre-text = "Shell: " 59 | output-style = "white" 60 | 61 | [resolution] 62 | pre-text-style = "bold.yellow" 63 | pre-text = "Resolution: " 64 | output-style = "white" 65 | 66 | [desktop-environment] 67 | pre-text-style = "bold.yellow" 68 | pre-text = "Desktop Environment: " 69 | output-style = "white" 70 | 71 | [window-manager] 72 | pre-text-style = "bold.yellow" 73 | pre-text = "Window Manager: " 74 | output-style = "white" 75 | 76 | [terminal] 77 | pre-text-style = "bold.yellow" 78 | pre-text = "Terminal: " 79 | output-style = "white" 80 | 81 | [cpu] 82 | pre-text-style = "bold.yellow" 83 | pre-text = "CPU: " 84 | output-style = "white" 85 | -------------------------------------------------------------------------------- /src/logos/ubuntu_linux: -------------------------------------------------------------------------------- 1 |  .-/+oossssoo+\-. 2 |  ´:+ssssssssssssssssss+:` 3 |  -+ssssssssssssssssssyyssss+- 4 |  .ossssssssssssssssssdMMMNysssso. 5 |  /ssssssssssshdmmNNmmyNMMMMhssssss\ 6 |  +ssssssssshmydMMMMMMMNddddyssssssss+ 7 |  /sssssssshNMMMyhhyyyyhmNMMMNhssssssss\ 8 |  .ssssssssdMMMNhsssssssssshNMMMdssssssss. 9 |  +sssshhhyNMMNyssssssssssssyNMMMysssssss+ 10 |  ssyNMMMNyMMhsssssssssssssshmmmhssssssso 11 |  ssyNMMMNyMMhsssssssssssssshmmmhssssssso 12 |  +sssshhhyNMMNyssssssssssssyNMMMysssssss+ 13 |  .ssssssssdMMMNhsssssssssshNMMMdssssssss. 14 |  \sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ 15 |  +sssssssssdmydMMMMMMMMddddyssssssss+ 16 |  \ssssssssssshdmNNNNmyNMMMMhssssss/ 17 |  .ossssssssssssssssssdMMMNysssso. 18 |  -+sssssssssssssssssyyyssss+- 19 |  `:+ssssssssssssssssss+:` 20 |  .-\+oossssoo+/-. 21 | -------------------------------------------------------------------------------- /.github/workflows/upload_binaries.yaml: -------------------------------------------------------------------------------- 1 | name: Release Binaries 2 | 3 | permissions: 4 | contents: write 5 | 6 | on: 7 | workflow_dispatch: 8 | release: 9 | types: [published] 10 | 11 | jobs: 12 | upload-assets: 13 | strategy: 14 | matrix: 15 | os: 16 | - ubuntu-latest 17 | - macos-latest 18 | - windows-latest 19 | runs-on: ${{ matrix.os }} 20 | steps: 21 | - uses: actions/checkout@v3 22 | with: 23 | fetch-depth: 0 24 | - name: Get Latest Tag 25 | id: latest-tag 26 | run: | 27 | echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT 28 | echo $(git describe --tags --abbrev=0) 29 | shell: bash 30 | - uses: taiki-e/upload-rust-binary-action@v1 31 | with: 32 | ref: refs/tags/${{ steps.latest-tag.outputs.tag }} 33 | bin: rocketfetch 34 | token: ${{ secrets.GITHUB_TOKEN }} 35 | archive: $bin-$target-$tag 36 | bump-brew-tap: 37 | needs: upload-assets 38 | runs-on: macos-latest 39 | steps: 40 | - uses: actions/checkout@v3 41 | with: 42 | fetch-depth: 0 43 | - name: Get Latest Tag 44 | id: latest-tag 45 | run: | 46 | echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT 47 | shell: bash 48 | - name: Set SHA 49 | id: shasum 50 | run: | 51 | echo "sha=$(wget -O rocketfetch https://github.com/devanlooches/rocketfetch/releases/download/${{ steps.latest-tag.outputs.tag }}/rocketfetch-aarch64-apple-darwin-${{ steps.latest-tag.outputs.tag }}.tar.gz && shasum -a 256 rocketfetch | awk '{ print $1 }')" >> $GITHUB_OUTPUT 52 | - name: Bump Brew 53 | env: 54 | HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} 55 | run: | 56 | brew tap devanlooches/rocketfetch && cd $(brew --repo devanlooches/rocketfetch) 57 | brew bump-formula-pr -f --version=$( echo ${{ steps.latest-tag.outputs.tag }} | sed 's/^.//' ) --no-browse --no-audit \ 58 | --sha256=${{ steps.shasum.outputs.sha }} \ 59 | --url="https://github.com/devanlooches/rocketfetch/releases/download/${{ steps.latest-tag.outputs.tag }}/rocketfetch-aarch64-apple-darwin-${{ steps.latest-tag.outputs.tag }}.tar.gz" \ 60 | rocketfetch 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

Rocketfetch

3 | A *WIP* (Contributions are greatly appreciated) command line system information tool written in Rust for performance 4 | with TOML file configuration. 5 | 6 | Crates.io version 7 | Crates.io version 8 | Libraries.io dependency status for latest release 9 |
10 | 11 | # Table of Contents 12 | - [Inspiration](#inspiration) 13 | - [Installation](#installation) 14 | - [Command Line](#cli) 15 | - [Configuration](#configuration) 16 | - [Top Level](#top_level_configuration) 17 | - [Format Header](#format_header_configuration) 18 | - [User Header](#user_header_configuration) 19 | - [Delimiter Header](#delimiter_header_configuration) 20 | - [OS Header](#os_header_configuration) 21 | - [Host Header](#host_header_configuration) 22 | - [Kernel Header](#kernel_header_configuration) 23 | - [Uptime Header](#uptime_header_configuration) 24 | - [Packages Header](#packages_header_configuration) 25 | - [Packages Header](#packages_header_configuration) 26 | - [Shell Header](#shell_header_configuration) 27 | - [Resolution Header](#resolution_header_configuration) 28 | - [Desktop Environment Header](#desktop_environment_header_configuration) 29 | - [Window Manager Header](#window_manager_header_configuration) 30 | - [Terminal Header](#terminal_header_configuration) 31 | - [Custom Header](#custom_header_configuration) 32 | - [Default Configuration](#default_configuration) 33 | - [Todo](#todo) 34 | 35 | 36 | # Inspiration 37 | _Rocketfetch_ was inspired by [neofetch](https://github.com/dylanaraps/neofetch). I wanted to add some performance to 38 | neofetch while also improving the configuration. I modeled my configuration after that of 39 | [Starship](https://github.com/starship/starship). 40 | 41 | # Installation 42 | - Using Cargo: 43 | ```bash 44 | cargo install rocketfetch 45 | ``` 46 | If this fails to install, please make sure you have the most recent Rust version installed. 47 | - Using Homebrew For MacOSX: 48 | ```bash 49 | brew install devanlooches/rocketfetch/rocketfetch 50 | ``` 51 | 52 | # Command Line 53 | ```bash 54 | rocketfetch 0.6.9 55 | A WIP command line system information tool (neofetch) rewritten in rust for performance with toml file configuration. 56 | 57 | USAGE: 58 | rocketfetch [FLAGS] [OPTIONS] 59 | 60 | FLAGS: 61 | -h, --help Prints help information 62 | --no-line-wrap Disables Line Wrapping 63 | -V, --version Prints version information 64 | 65 | OPTIONS: 66 | -c, --config Sets custom configuration file. 67 | -m, --mode Set the printing mode. Can be one of `side-block`, `bottom-block`, or `classic` 68 | ``` 69 | 70 | # Configuration 71 | You can configure rocketfetch either through the default path of ~/.config/rocketfetch or pass a path in cli by 72 | specifying the -c option. 73 | ### Top Level 74 | | Value | Default | Description | 75 | |--------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 76 | | module-order | "user delimiter os host kernel uptime packages" | Specify the order in which the modules will go in separated by spaces. Possible modules are: user, delimiter, os, host, kernel, uptime, packages, as well as any custom modules you have defined. You may specify some more than once. More coming soon! | 77 | | offset | 4 | Specify the number of spaces between the logo and the information. | 78 | | wrap-lines | true | Wether or not to wrap the output lines.| 79 | | logo-cmd | "auto" | The command to run in order to get the logo. If set to auto or nothing, it will automatically detect the operating system and choose a logo based on the result. (Only macos and Arch Linux is supported as of right now.) | 80 | 81 | ### Format Header 82 | | Value | Default | Description | 83 | | ---------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 84 | | mode | "classic" | Set the mode of output. Could be one of classic (neofetch style), side-block (with a block around the info), or bottom-block (with the logo above the block of info). | 85 | | top-left-corner-char | "╭" | Set the character to use as the top left corner of the block (Only works in and bottom-block modes). | 86 | | top-right-corner-char | "╮" | Set the character to use as the top right corner of the block (Only works in side-block and bottom-block modes). | 87 | | bottom-left-corner-char | "╰" | Set the character to use as the bottom left corner of the block (Only works in side-block and bottom-block modes). | 88 | | bottom-right-corner-char | "╯" | Set the character to use as the bottom right corner of the block (Only works in side-block and bottom-block modes). | 89 | | horizontal-char | "─" | Set the character to use as the top and bottom parts of the block (Only works in side-block and bottom-block modes). | 90 | | vertical-char | "│" | Set the character to use as the right and left parts of the block (Only works in side-block and bottom-block modes). | 91 | | padding-left | 1 | Set the number of spaces to put before each module inside the block (Only works in side-block and bottom-block modes). | 92 | | padding-right | 1 | Set the number of spaces to put after each module inside the block (Only works in side-block and bottom-block modes). | 93 | | padding-top | 0 | Set the number of lines to put above the modules inside the block (Only works in side-block and bottom-block modes). | 94 | 95 | ### User Header 96 | | Value | Default | Description | 97 | |-----------------|---------------|---------------------------------------------------------------------------------------------------------------------| 98 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 99 | | pre-text | "" | Text that comes before this module | 100 | | output-style | "white" | A format string with each word separated by dots that describes the style of the text | 101 | | separator-style | "white" | A format string with each word separated by dots that describes the style of the between username and hostname | 102 | | separator-char | "@" | A character that separates between the username and hostname | 103 | 104 | ### Delimiter Header 105 | | Value | Default | Description | 106 | | ------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 107 | | style | "white" | A format string with each word separated by dots that describes the style of the delimiter | 108 | | repeat-num | 0 | The number of times to repeat the delimiter char to form the delimiter. If set to 0, it will the repeat number to the length of the module above this one | 109 | | char | "-" | The character to use as the delimiter | 110 | 111 | ### OS Header 112 | | Value | Default | Description | 113 | | ---------------- | --------------- | --------------------------------------------------------------------------------------------------------------------- | 114 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 115 | | pre-text | "OS: " | Text that comes before this module | 116 | | output-style | "white" | A format string with each word separated by dots that describes the style of the text | 117 | 118 | ### Host Header 119 | | Value | Default | Description | 120 | |----------------|---------------|---------------------------------------------------------------------------------------------------------------------| 121 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 122 | | pre-text | "Host: " | Text that comes before this module | 123 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 124 | 125 | ### Kernel Header 126 | | Value | Default | Description | 127 | |----------------|---------------|---------------------------------------------------------------------------------------------------------------------| 128 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 129 | | pre-text | "Kernel: " | Text that comes before this module | 130 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 131 | 132 | ### Uptime Header 133 | | Value | Default | Description | 134 | |----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------| 135 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 136 | | pre-text | "Uptime: " | Text that comes before this module | 137 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 138 | | time-format | "$days days, $hours hours, $minutes minutes" | A String that describes the format of the time. Variables are: $years, $days, $hours, $minutes, $seconds. | 139 | 140 | ### Packages Header 141 | | Value | Default | Description | 142 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 143 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 144 | | pre-text | "Packages: " | Text that comes before this module | 145 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 146 | 147 | ### Shell Header 148 | | Value | Default | Description | 149 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 150 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 151 | | pre-text | "Shell: " | Text that comes before this module | 152 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 153 | 154 | ### Resolution Header 155 | | Value | Default | Description | 156 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 157 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 158 | | pre-text | "Resolution: " | Text that comes before this module | 159 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 160 | 161 | ### Desktop Environment Header 162 | | Value | Default | Description | 163 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 164 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 165 | | pre-text | "Desktop Environment: " | Text that comes before this module | 166 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 167 | 168 | ### Window Manager Header 169 | | Value | Default | Description | 170 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 171 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 172 | | pre-text | "Window Manager: " | Text that comes before this module | 173 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 174 | 175 | ### Terminal Header 176 | | Value | Default | Description | 177 | |-----------------|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| 178 | | pre-text-style | "bold.yellow" | A format string with each word separated by dots that describes the style of the text that comes before this module | 179 | | pre-text | "Terminal: " | Text that comes before this module | 180 | | output-style | "white" | A format string with each word separated by dots that describes the style of the output text | 181 | 182 | ### Custom Header 183 | | Value | Description | 184 | |----------------|---------------------------------------------------------------------------------------------------------------| 185 | | pre-text-style | A format string with each word separated by dots that describes the style of the text that before this module | 186 | | pre-text | Text that comes before this module | 187 | | output-style | A format string with each word separated by dots that describes the style of the output text | 188 | | command | The command to run to get the output of the module | 189 | 190 | # Default Configuration 191 | A default Configuration will look like so: 192 | ```toml 193 | module-order = "user delimiter os host kernel uptime packages shell resolution desktop-environment window-manager terminal cpu" 194 | offset = 4 195 | logo-cmd = "auto" 196 | wrap-lines = true 197 | 198 | [format] 199 | mode = "classic" 200 | top-left-corner-char = "╭" 201 | top-right-corner-char = "╮" 202 | bottom-left-corner-char = "╰" 203 | bottom-right-corner-char = "╯" 204 | horizontal-char = "─" 205 | vertical-char = "│" 206 | padding-left = 1 207 | padding-right = 1 208 | padding-top = 0 209 | 210 | [user] 211 | pre-text-style = "bold.yellow" 212 | pre-text = "" 213 | output-style = "bold.yellow" 214 | separator-style = "white" 215 | separator-char = "@" 216 | 217 | [delimiter] 218 | style = "white" 219 | repeat-num = 0 220 | char = "-" 221 | 222 | [os] 223 | pre-text-style = "bold.yellow" 224 | pre-text = "OS: " 225 | output-style = "white" 226 | 227 | [host] 228 | pre-text-style = "bold.yellow" 229 | pre-text = "Host: " 230 | output-style = "white" 231 | 232 | [kernel] 233 | pre-text-style = "bold.yellow" 234 | pre-text = "Kernel: " 235 | output-style = "white" 236 | 237 | [uptime] 238 | pre-text-style = "bold.yellow" 239 | pre-text = "Uptime: " 240 | output-style = "white" 241 | time-format = "$days days, $hours hours, $minutes minutes" 242 | 243 | [packages] 244 | pre-text-style = "bold.yellow" 245 | pre-text = "Packages: " 246 | output-style = "white" 247 | 248 | [shell] 249 | pre-text-style = "bold.yellow" 250 | pre-text = "Shell: " 251 | output-style = "white" 252 | 253 | [resolution] 254 | pre-text-style = "bold.yellow" 255 | pre-text = "Resolution: " 256 | output-style = "white" 257 | 258 | [desktop-environment] 259 | pre-text-style = "bold.yellow" 260 | pre-text = "Desktop Environment: " 261 | output-style = "white" 262 | 263 | [window-manager] 264 | pre-text-style = "bold.yellow" 265 | pre-text = "Window Manager: " 266 | output-style = "white" 267 | 268 | [terminal] 269 | pre-text-style = "bold.yellow" 270 | pre-text = "Terminal: " 271 | output-style = "white" 272 | 273 | [cpu] 274 | pre-text-style = "bold.yellow" 275 | pre-text = "CPU: " 276 | output-style = "white" 277 | ``` 278 | 279 | # Todo 280 | - [ ] Add more Modules (For starters: the ones that neofetch supports) 281 | - [x] Os 282 | - [x] Host 283 | - [x] Kernel 284 | - [x] Uptime 285 | - [x] Shell 286 | - [x] Resolution 287 | - [x] Desktop Environment 288 | - [x] Window Manager 289 | - [x] Terminal 290 | - [x] CPU 291 | - [ ] Window Manager Theme 292 | - [ ] GPU 293 | - [ ] Memory 294 | - [ ] GPU Driver 295 | - [ ] CPU Usage 296 | - [ ] Disk 297 | - [ ] Battery 298 | - [ ] Current Playing Song 299 | - [ ] Music Player 300 | - [ ] Local IP 301 | - [ ] Users 302 | - [ ] Locale 303 | - [ ] Colors 304 | -------------------------------------------------------------------------------- /src/modules.rs: -------------------------------------------------------------------------------- 1 | // use crate::utils::handle_error_result; 2 | use console::Style; 3 | use libmacchina::traits::GeneralReadout as _; 4 | use libmacchina::traits::KernelReadout as _; 5 | use libmacchina::traits::PackageReadout as _; 6 | use libmacchina::GeneralReadout; 7 | use libmacchina::KernelReadout; 8 | use libmacchina::PackageReadout; 9 | use user_error::{UserFacingError, UFE}; 10 | 11 | use crate::cli::Mode; 12 | use crate::config::Config; 13 | use crate::handle_error; 14 | 15 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 16 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 17 | pub struct Format { 18 | pub mode: Mode, 19 | pub top_left_corner_char: char, 20 | pub top_right_corner_char: char, 21 | pub bottom_left_corner_char: char, 22 | pub bottom_right_corner_char: char, 23 | pub horizontal_char: char, 24 | pub vertical_char: char, 25 | pub padding_right: usize, 26 | pub padding_left: usize, 27 | pub padding_top: usize, 28 | } 29 | 30 | impl Default for Format { 31 | fn default() -> Self { 32 | Self { 33 | mode: Mode::Classic, 34 | top_left_corner_char: '╭', 35 | top_right_corner_char: '╮', 36 | bottom_left_corner_char: '╰', 37 | bottom_right_corner_char: '╯', 38 | horizontal_char: '─', 39 | vertical_char: '│', 40 | padding_right: 1, 41 | padding_left: 1, 42 | padding_top: 0, 43 | } 44 | } 45 | } 46 | 47 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 48 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 49 | pub struct User { 50 | pre_text_style: String, 51 | pre_text: String, 52 | output_style: String, 53 | separator_style: String, 54 | separator_char: String, 55 | } 56 | 57 | impl Default for User { 58 | fn default() -> Self { 59 | Self { 60 | pre_text_style: String::from("bold.yellow"), 61 | pre_text: String::new(), 62 | output_style: String::from("bold.yellow"), 63 | separator_style: String::from("white"), 64 | separator_char: String::from("@"), 65 | } 66 | } 67 | } 68 | 69 | impl User { 70 | pub fn get_info(&self) -> String { 71 | let general_readout = GeneralReadout::new(); 72 | let hostname = handle_error!(general_readout.hostname(), "Failed to get hostname"); 73 | let username = handle_error!(general_readout.username(), "Failed to get username"); 74 | format!( 75 | "{}{}{}{}", 76 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 77 | Style::from_dotted_str(&self.output_style).apply_to(username), 78 | Style::from_dotted_str(&self.separator_style).apply_to(&self.separator_char), 79 | Style::from_dotted_str(&self.output_style).apply_to(hostname.trim()) 80 | ) 81 | } 82 | } 83 | 84 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 85 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 86 | pub struct Delimiter { 87 | style: String, 88 | repeat_num: usize, 89 | char: char, 90 | } 91 | 92 | impl Default for Delimiter { 93 | fn default() -> Self { 94 | Self { 95 | style: String::from("white"), 96 | repeat_num: 0, 97 | char: '-', 98 | } 99 | } 100 | } 101 | 102 | impl Delimiter { 103 | pub fn get_info(&self, num: usize) -> String { 104 | let mut repeat = self.repeat_num; 105 | if repeat == 0 { 106 | repeat = num; 107 | } 108 | format!( 109 | "{}", 110 | Style::from_dotted_str(&self.style).apply_to(self.char.to_string().repeat(repeat)) 111 | ) 112 | } 113 | } 114 | 115 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 116 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 117 | pub struct Os { 118 | pre_text_style: String, 119 | pre_text: String, 120 | output_style: String, 121 | } 122 | 123 | impl Default for Os { 124 | fn default() -> Self { 125 | Self { 126 | pre_text_style: String::from("bold.yellow"), 127 | pre_text: String::from("OS: "), 128 | output_style: String::from("white"), 129 | } 130 | } 131 | } 132 | 133 | impl Os { 134 | pub fn get_os() -> String { 135 | let general_readout = GeneralReadout::new(); 136 | if cfg!(target_os = "linux") { 137 | return handle_error!(general_readout.distribution(), "Failed to find distro"); 138 | } else if cfg!(target_os = "windows") { 139 | let version = handle_error!( 140 | KernelReadout::new().os_release(), 141 | "Failed to get windows version" 142 | ); 143 | return format!("Windows {version}"); 144 | } 145 | handle_error!(general_readout.os_name(), "Failed to find OS name") 146 | } 147 | pub fn get_info(&self) -> String { 148 | let os = Self::get_os(); 149 | let build_version = Config::run_cmd("sw_vers -buildVersion", "Failed to get build version"); 150 | let arch = Config::run_cmd("machine", "Failed to get arch"); 151 | 152 | let output_style = Style::from_dotted_str(&self.output_style); 153 | format!( 154 | "{}{} {} {}", 155 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 156 | output_style.apply_to(os.trim()), 157 | output_style.apply_to(build_version.trim()), 158 | output_style.apply_to(arch.trim()) 159 | ) 160 | } 161 | } 162 | 163 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 164 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 165 | pub struct Host { 166 | pre_text_style: String, 167 | pre_text: String, 168 | output_style: String, 169 | } 170 | 171 | impl Default for Host { 172 | fn default() -> Self { 173 | Self { 174 | pre_text_style: String::from("bold.yellow"), 175 | pre_text: String::from("Host: "), 176 | output_style: String::from("white"), 177 | } 178 | } 179 | } 180 | 181 | impl Host { 182 | pub fn get_info(&self) -> String { 183 | let general_readout = GeneralReadout::new(); 184 | let machine = handle_error!(general_readout.machine(), "Failed to find machine name"); 185 | format!( 186 | "{}{}", 187 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 188 | Style::from_dotted_str(&self.output_style).apply_to(machine.trim()) 189 | ) 190 | } 191 | } 192 | 193 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 194 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 195 | pub struct Kernel { 196 | pre_text_style: String, 197 | pre_text: String, 198 | output_style: String, 199 | } 200 | 201 | impl Default for Kernel { 202 | fn default() -> Self { 203 | Self { 204 | pre_text_style: String::from("bold.yellow"), 205 | pre_text: String::from("Kernel: "), 206 | output_style: String::from("white"), 207 | } 208 | } 209 | } 210 | 211 | impl Kernel { 212 | pub fn get_info(&self) -> String { 213 | let kernel_readout = KernelReadout::new(); 214 | let kernel = handle_error!( 215 | kernel_readout.pretty_kernel(), 216 | "Failed to find kernel version" 217 | ); 218 | format!( 219 | "{}{}", 220 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 221 | Style::from_dotted_str(&self.output_style).apply_to(kernel.trim()) 222 | ) 223 | } 224 | } 225 | 226 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 227 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 228 | pub struct Uptime { 229 | pre_text_style: String, 230 | pre_text: String, 231 | output_style: String, 232 | time_format: String, 233 | } 234 | 235 | impl Default for Uptime { 236 | fn default() -> Self { 237 | Self { 238 | pre_text_style: String::from("bold.yellow"), 239 | pre_text: String::from("Uptime: "), 240 | output_style: String::from("white"), 241 | time_format: String::from("$days days, $hours hours, $minutes minutes"), 242 | } 243 | } 244 | } 245 | 246 | impl Uptime { 247 | pub fn get_info(&self) -> String { 248 | let general_readout = GeneralReadout::new(); 249 | let uptime = handle_error!(general_readout.uptime(), "Failed to get uptime"); 250 | let shr = secfmt::from(uptime as u64); 251 | let mut time = self.time_format.clone(); 252 | time = time.replace("$years", &shr.years.to_string()); 253 | time = time.replace("${years}", &shr.years.to_string()); 254 | time = time.replace("$days", &shr.days.to_string()); 255 | time = time.replace("${days}", &shr.days.to_string()); 256 | time = time.replace("$hours", &shr.hours.to_string()); 257 | time = time.replace("${hours}", &shr.hours.to_string()); 258 | time = time.replace("$minutes", &shr.minutes.to_string()); 259 | time = time.replace("${minutes}", &shr.minutes.to_string()); 260 | time = time.replace("$seconds", &shr.seconds.to_string()); 261 | time = time.replace("${seconds}", &shr.seconds.to_string()); 262 | format!( 263 | "{}{}", 264 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 265 | Style::from_dotted_str(&self.output_style).apply_to(time.trim()) 266 | ) 267 | } 268 | } 269 | 270 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 271 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 272 | pub struct Packages { 273 | pre_text_style: String, 274 | pre_text: String, 275 | output_style: String, 276 | } 277 | 278 | impl Default for Packages { 279 | fn default() -> Self { 280 | Self { 281 | pre_text_style: String::from("bold.yellow"), 282 | pre_text: String::from("Packages: "), 283 | output_style: String::from("white"), 284 | } 285 | } 286 | } 287 | 288 | impl Packages { 289 | pub fn get_info(&self) -> String { 290 | let package_readout = PackageReadout::new(); 291 | let package = package_readout.count_pkgs(); 292 | let mut packages = String::new(); 293 | for (name, num) in package { 294 | packages.push_str(format!("{} ({}) ", num, name.to_string()).as_str()); 295 | } 296 | format!( 297 | "{}{}", 298 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 299 | Style::from_dotted_str(&self.output_style).apply_to(packages.trim()) 300 | ) 301 | } 302 | } 303 | 304 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 305 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 306 | pub struct Shell { 307 | pre_text_style: String, 308 | pre_text: String, 309 | output_style: String, 310 | } 311 | 312 | impl Default for Shell { 313 | fn default() -> Self { 314 | Self { 315 | pre_text_style: String::from("bold.yellow"), 316 | pre_text: String::from("Shell: "), 317 | output_style: String::from("white"), 318 | } 319 | } 320 | } 321 | 322 | impl Shell { 323 | pub fn get_info(&self) -> String { 324 | use regex::Regex; 325 | let ver_regex = Regex::new(r"(0|[1-9]\d*)\.(0|[1-9]\d*)\.?(0|[1-9]\d*)?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?").unwrap(); 326 | let general_readout = &GeneralReadout::new(); 327 | let shell = general_readout.shell( 328 | libmacchina::traits::ShellFormat::Relative, 329 | libmacchina::traits::ShellKind::Default, 330 | ); 331 | let shell = handle_error!(shell, "Failed to get shell"); 332 | let version_output = Config::run_cmd( 333 | format!("{shell} --version").as_str(), 334 | "Failed to get shell version", 335 | ); 336 | let version: String; 337 | if let Some(locations) = ver_regex.find(&version_output) { 338 | version = version_output[locations.start()..locations.end()].to_string(); 339 | } else { 340 | version = String::from("(Unknown Version)"); 341 | } 342 | format!( 343 | "{}{} {}", 344 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 345 | Style::from_dotted_str(&self.output_style).apply_to(shell.trim()), 346 | Style::from_dotted_str(&self.output_style).apply_to(version.trim()) 347 | ) 348 | } 349 | } 350 | 351 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 352 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 353 | pub struct Resolution { 354 | pre_text_style: String, 355 | pre_text: String, 356 | output_style: String, 357 | } 358 | 359 | impl Default for Resolution { 360 | fn default() -> Self { 361 | Self { 362 | pre_text_style: String::from("bold.yellow"), 363 | pre_text: String::from("Resolution: "), 364 | output_style: String::from("white"), 365 | } 366 | } 367 | } 368 | 369 | impl Resolution { 370 | pub fn get_info(&self) -> String { 371 | let general_readout = GeneralReadout::new(); 372 | let resolution = handle_error!(general_readout.resolution(), "Failed to get resolution"); 373 | 374 | format!( 375 | "{}{}", 376 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 377 | Style::from_dotted_str(&self.output_style).apply_to(resolution.trim()), 378 | ) 379 | } 380 | } 381 | 382 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 383 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 384 | pub struct DesktopEnvironment { 385 | pre_text_style: String, 386 | pre_text: String, 387 | output_style: String, 388 | } 389 | 390 | impl Default for DesktopEnvironment { 391 | fn default() -> Self { 392 | Self { 393 | pre_text_style: String::from("bold.yellow"), 394 | pre_text: String::from("Desktop Environment: "), 395 | output_style: String::from("white"), 396 | } 397 | } 398 | } 399 | 400 | impl DesktopEnvironment { 401 | pub fn get_info(&self) -> String { 402 | let general_readout = GeneralReadout::new(); 403 | let desktop_environment = handle_error!( 404 | general_readout.desktop_environment(), 405 | "Failed to get desktop environment" 406 | ); 407 | 408 | format!( 409 | "{}{}", 410 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 411 | Style::from_dotted_str(&self.output_style).apply_to(desktop_environment.trim()), 412 | ) 413 | } 414 | } 415 | 416 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 417 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 418 | pub struct WindowManager { 419 | pre_text_style: String, 420 | pre_text: String, 421 | output_style: String, 422 | } 423 | 424 | impl Default for WindowManager { 425 | fn default() -> Self { 426 | Self { 427 | pre_text_style: String::from("bold.yellow"), 428 | pre_text: String::from("Window Manager: "), 429 | output_style: String::from("white"), 430 | } 431 | } 432 | } 433 | 434 | impl WindowManager { 435 | pub fn get_info(&self) -> String { 436 | let general_readout = GeneralReadout::new(); 437 | let window_manager = handle_error!( 438 | general_readout.window_manager(), 439 | "Failed to get window manager" 440 | ); 441 | 442 | format!( 443 | "{}{}", 444 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 445 | Style::from_dotted_str(&self.output_style).apply_to(window_manager.trim()), 446 | ) 447 | } 448 | } 449 | 450 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 451 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 452 | pub struct Terminal { 453 | pre_text_style: String, 454 | pre_text: String, 455 | output_style: String, 456 | } 457 | 458 | impl Default for Terminal { 459 | fn default() -> Self { 460 | Self { 461 | pre_text_style: String::from("bold.yellow"), 462 | pre_text: String::from("Terminal: "), 463 | output_style: String::from("white"), 464 | } 465 | } 466 | } 467 | 468 | impl Terminal { 469 | pub fn get_info(&self) -> String { 470 | let general_readout = GeneralReadout::new(); 471 | let terminal = handle_error!(general_readout.terminal(), "Failed to get terminal name"); 472 | 473 | format!( 474 | "{}{}", 475 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 476 | Style::from_dotted_str(&self.output_style).apply_to(terminal.trim()), 477 | ) 478 | } 479 | } 480 | 481 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 482 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 483 | pub struct Cpu { 484 | pre_text_style: String, 485 | pre_text: String, 486 | output_style: String, 487 | } 488 | 489 | impl Default for Cpu { 490 | fn default() -> Self { 491 | Self { 492 | pre_text_style: String::from("bold.yellow"), 493 | pre_text: String::from("CPU: "), 494 | output_style: String::from("white"), 495 | } 496 | } 497 | } 498 | 499 | impl Cpu { 500 | pub fn get_info(&self) -> String { 501 | let general_readout = GeneralReadout::new(); 502 | let cpu = handle_error!(general_readout.cpu_model_name(), "Failed to get CPU name"); 503 | 504 | format!( 505 | "{}{}", 506 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 507 | Style::from_dotted_str(&self.output_style).apply_to(cpu.trim()), 508 | ) 509 | } 510 | } 511 | 512 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 513 | #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 514 | pub struct Module { 515 | pre_text_style: String, 516 | pre_text: String, 517 | output_style: String, 518 | command: String, 519 | } 520 | 521 | impl Module { 522 | pub fn get_info(&self) -> String { 523 | let output = Config::run_cmd(&self.command, "Failed to run module command"); 524 | 525 | format!( 526 | "{}{}", 527 | Style::from_dotted_str(&self.pre_text_style).apply_to(&self.pre_text), 528 | Style::from_dotted_str(&self.output_style).apply_to(output.trim()) 529 | ) 530 | } 531 | } 532 | 533 | impl Default for Module { 534 | fn default() -> Self { 535 | Self { 536 | command: String::new(), 537 | output_style: String::from("white"), 538 | pre_text: String::new(), 539 | pre_text_style: String::from("bold.yellow"), 540 | } 541 | } 542 | } 543 | 544 | #[cfg(test)] 545 | mod module_tests { 546 | use super::*; 547 | 548 | fn run_cmd_unsafe(cmd: &str) -> String { 549 | use std::process::Command; 550 | let output = Command::new("sh") 551 | .args(["-c", cmd]) 552 | .output() 553 | .unwrap() 554 | .stdout; 555 | String::from_utf8(output).unwrap().trim().to_string() 556 | } 557 | 558 | #[test] 559 | fn get_username() { 560 | let general_readout = GeneralReadout::new(); 561 | println!("Username: {}", general_readout.username().unwrap()); 562 | } 563 | 564 | #[test] 565 | fn get_hostname() { 566 | let general_readout = GeneralReadout::new(); 567 | println!("Hostname: {}", general_readout.hostname().unwrap()); 568 | } 569 | 570 | #[test] 571 | fn get_os() { 572 | let general_readout = GeneralReadout::new(); 573 | if cfg!(target_os = "linux") { 574 | println!("Linux Distro: {}", general_readout.distribution().unwrap()); 575 | } else { 576 | println!("OS Name: {}", general_readout.os_name().unwrap()); 577 | println!("OS Release: {}", KernelReadout::new().os_release().unwrap()); 578 | } 579 | } 580 | 581 | #[test] 582 | fn get_build_version() { 583 | println!("Build Version: {}", run_cmd_unsafe("sw_vers -buildVersion")); 584 | } 585 | 586 | #[test] 587 | fn get_arch() { 588 | println!("Arch: {}", run_cmd_unsafe("machine")); 589 | } 590 | 591 | #[test] 592 | #[cfg(not(target_os = "linux"))] 593 | fn get_host() { 594 | let general_readout = GeneralReadout::new(); 595 | println!("Host: {}", general_readout.machine().unwrap()); 596 | } 597 | 598 | #[test] 599 | fn get_kernel() { 600 | let kernel_readout = KernelReadout::new(); 601 | println!("Kernel: {}", kernel_readout.pretty_kernel().unwrap()); 602 | } 603 | 604 | #[test] 605 | fn get_uptime() { 606 | let general_readout = GeneralReadout::new(); 607 | println!("Uptime: {}", general_readout.uptime().unwrap()); 608 | } 609 | 610 | #[test] 611 | #[cfg(not(target_os = "linux"))] 612 | fn get_packages() { 613 | let package_readout = PackageReadout::new(); 614 | let package = package_readout.count_pkgs(); 615 | let mut packages = String::new(); 616 | for (name, num) in package { 617 | packages.push_str(format!("{} ({}) ", num, name.to_string()).as_str()); 618 | } 619 | println!("Packages: {packages}"); 620 | } 621 | 622 | #[test] 623 | #[cfg(not(target_os = "windows"))] 624 | fn get_shell() { 625 | use regex::Regex; 626 | let ver_regex = Regex::new(r"(0|[1-9]\d*)\.(0|[1-9]\d*)\.?(0|[1-9]\d*)?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?").unwrap(); 627 | let general_readout = &GeneralReadout::new(); 628 | let shell = general_readout 629 | .shell( 630 | libmacchina::traits::ShellFormat::Relative, 631 | libmacchina::traits::ShellKind::Default, 632 | ) 633 | .unwrap(); 634 | let version = run_cmd_unsafe(format!("{shell} --version").as_str()); 635 | let locations = ver_regex.find(&version).unwrap(); 636 | let version = &version[locations.start()..locations.end()]; 637 | println!("Shell: {shell} version {version}"); 638 | } 639 | 640 | #[test] 641 | #[cfg(not(target_os = "windows"))] 642 | fn get_resolution() { 643 | let general_readout = GeneralReadout::new(); 644 | println!("Resolution: {}", general_readout.resolution().unwrap()); 645 | } 646 | 647 | #[test] 648 | #[cfg(all(not(target_os = "linux"), not(target_os = "windows")))] 649 | fn get_desktop_environment() { 650 | let general_readout = GeneralReadout::new(); 651 | println!( 652 | "Desktop Environment: {}", 653 | general_readout.desktop_environment().unwrap() 654 | ); 655 | } 656 | 657 | #[test] 658 | #[cfg(all(not(target_os = "linux"), not(target_os = "windows")))] 659 | fn get_window_manager() { 660 | let general_readout = GeneralReadout::new(); 661 | println!( 662 | "Window Manager: {}", 663 | general_readout.window_manager().unwrap() 664 | ); 665 | } 666 | 667 | #[test] 668 | #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))] 669 | fn get_terminal_name() { 670 | let general_readout = GeneralReadout::new(); 671 | println!("Terminal: {}", general_readout.terminal().unwrap()); 672 | } 673 | 674 | #[test] 675 | fn get_cpu() { 676 | let general_readout = GeneralReadout::new(); 677 | println!("CPU: {}", general_readout.cpu_model_name().unwrap()); 678 | } 679 | } 680 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use std::cmp::Ordering; 2 | use std::collections::HashMap; 3 | 4 | use any_terminal_size::any_terminal_size; 5 | use clap::Parser; 6 | use console::measure_text_width; 7 | use console::style; 8 | use user_error::{UserFacingError, UFE}; 9 | 10 | use crate::cli::Mode; 11 | use crate::cli::Opt; 12 | use crate::handle_error; 13 | use crate::modules::{ 14 | Cpu, Delimiter, DesktopEnvironment, Format, Host, Kernel, Module, Os, Packages, Resolution, 15 | Shell, Terminal, Uptime, User, WindowManager, 16 | }; 17 | 18 | #[derive(Deserialize, Debug, PartialEq, Eq, Clone)] 19 | #[serde(rename_all = "kebab-case", default)] 20 | pub struct Config { 21 | module_order: String, 22 | wrap_lines: bool, 23 | offset: usize, 24 | logo_cmd: String, 25 | format: Format, 26 | user: User, 27 | delimiter: Delimiter, 28 | os: Os, 29 | host: Host, 30 | kernel: Kernel, 31 | uptime: Uptime, 32 | packages: Packages, 33 | shell: Shell, 34 | resolution: Resolution, 35 | desktop_environment: DesktopEnvironment, 36 | window_manager: WindowManager, 37 | terminal: Terminal, 38 | cpu: Cpu, 39 | 40 | #[serde(flatten)] 41 | custom_modules: HashMap, 42 | } 43 | 44 | impl Config { 45 | pub fn get_args() -> Opt { 46 | Opt::parse() 47 | } 48 | pub fn path() -> String { 49 | let matches = Self::get_args(); 50 | let home_dir = handle_error!(dirs::home_dir().ok_or(""), "Failed to find home directory"); 51 | 52 | matches.config.unwrap_or(format!( 53 | "{}/.config/rocketfetch/config.toml", 54 | home_dir.to_string_lossy() 55 | )) 56 | } 57 | pub fn from_config(path: String) -> Self { 58 | match std::fs::read_to_string(path) { 59 | Ok(string) => match toml::from_str::(&string) { 60 | Ok(v) => v, 61 | Err(r) => { 62 | let mut line: usize = 0; 63 | let mut column: usize = 0; 64 | let mut last = String::new(); 65 | let r = r.to_string(); 66 | println!("{r}"); 67 | let error = handle_error!( 68 | r.split("at").last().ok_or(""), 69 | "Failed to get line and column number of configuration error" 70 | ); 71 | for word in error.split_whitespace() { 72 | if last == "line" { 73 | line = handle_error!( 74 | word.parse::(), 75 | "Failed to get line number of configuration error" 76 | ); 77 | } else if last == "column" { 78 | column = handle_error!( 79 | word.parse::(), 80 | "Failed to get column number of configuration error" 81 | ); 82 | } 83 | last = word.to_string(); 84 | } 85 | UserFacingError::new("Unable to parse toml file") 86 | .reason(format!( 87 | "--> {line}:{col} 88 | {line_len_sep} | 89 | {line} | {line_contents} 90 | {line_len_sep} |{col_len_sep}^--- {error} 91 | {line_len_sep} |", 92 | error = r, 93 | line_len_sep = " ".repeat(line.to_string().len()), 94 | col_len_sep = " ".repeat(column), 95 | line = line, 96 | line_contents = string.lines().collect::>()[line - 1], 97 | col = column, 98 | )) 99 | .print_and_exit(); 100 | unreachable!() 101 | } 102 | }, 103 | 104 | Err(r) => { 105 | println!( 106 | "{}: Could not find default configuration file: {}. Falling back to default configuration.\n", 107 | style("WARNING").yellow(), 108 | r 109 | ); 110 | Self::default() 111 | } 112 | } 113 | } 114 | 115 | fn get_module_order(&self) -> Vec { 116 | use std::thread; 117 | let modules = self.module_order.split_whitespace().collect::>(); 118 | let mut modules_unordered = HashMap::new(); 119 | 120 | thread::scope(|s| { 121 | let mut handles = Vec::new(); 122 | macro_rules! add_module { 123 | ($name:expr, $name_lit:literal) => { 124 | if modules.contains(&$name_lit) { 125 | let handle = s.spawn(|| -> (String, String) { 126 | (String::from($name_lit), $name.get_info().replace('\n', " ")) 127 | }); 128 | handles.push(handle); 129 | } 130 | }; 131 | } 132 | add_module!(self.user, "user"); 133 | add_module!(self.os, "os"); 134 | add_module!(self.host, "host"); 135 | add_module!(self.kernel, "kernel"); 136 | add_module!(self.uptime, "uptime"); 137 | add_module!(self.packages, "packages"); 138 | add_module!(self.shell, "shell"); 139 | add_module!(self.resolution, "resolution"); 140 | add_module!(self.desktop_environment, "desktop-environment"); 141 | add_module!(self.window_manager, "window-manager"); 142 | add_module!(self.terminal, "terminal"); 143 | add_module!(self.cpu, "cpu"); 144 | for (name, module) in &self.custom_modules { 145 | let handle = s.spawn(|| -> (String, String) { 146 | (name.clone(), module.get_info().replace('\n', " ")) 147 | }); 148 | handles.push(handle); 149 | } 150 | for handle in handles { 151 | let joined_handle = handle.join().unwrap(); 152 | modules_unordered.insert(joined_handle.0, joined_handle.1); 153 | } 154 | }); 155 | // let modules_unordered = modules_unordered.into_inner().unwrap(); 156 | let mut vec: Vec = Vec::new(); 157 | for (i, module) in self.module_order.split_whitespace().enumerate() { 158 | match module { 159 | "delimiter" => vec.push( 160 | self.delimiter 161 | .get_info(measure_text_width(&vec[i - 1])) 162 | .replace('\n', " "), 163 | ), 164 | v => { 165 | let error = format!("Unknown module: {v}"); 166 | vec.push( 167 | handle_error!( 168 | modules_unordered.get(&String::from(v)).ok_or(""), 169 | error, 170 | "Make sure you have this module defined" 171 | ) 172 | .to_string(), 173 | ); 174 | } 175 | } 176 | } 177 | vec 178 | } 179 | 180 | #[cfg(target_os = "macos")] 181 | fn logo() -> Vec { 182 | include_str!("logos/macos") 183 | .lines() 184 | .map(str::to_string) 185 | .collect() 186 | } 187 | 188 | #[cfg(target_os = "linux")] 189 | fn logo() -> Vec { 190 | let os = crate::modules::Os::get_os(); 191 | match os.trim() { 192 | x if x.contains("Arch Linux") => include_str!("logos/arch_linux") 193 | .lines() 194 | .map(str::to_string) 195 | .collect(), 196 | x if x.contains("Ubuntu") => include_str!("logos/ubuntu_linux") 197 | .lines() 198 | .map(str::to_string) 199 | .collect(), 200 | x if x.contains("Debian") => include_str!("logos/debian_linux") 201 | .lines() 202 | .map(str::to_string) 203 | .collect(), 204 | v => { 205 | UserFacingError::new(format!("Unknown OS: {}", v)) 206 | .help("Please file a new issue on github to request support for a new OS: https://github.com/devanlooches/rocketfetch/issues/new") 207 | .print_and_exit(); 208 | unreachable!() 209 | } 210 | } 211 | } 212 | 213 | #[cfg(target_os = "windows")] 214 | fn logo() -> Vec { 215 | include_str!("logos/windows") 216 | .lines() 217 | .map(str::to_string) 218 | .collect() 219 | } 220 | 221 | fn get_logo(&self) -> Vec { 222 | if self.logo_cmd.is_empty() || self.logo_cmd == "auto" { 223 | Self::logo() 224 | } else { 225 | Self::run_cmd(&self.logo_cmd, "Failed to run logo command") 226 | .lines() 227 | .map(str::to_string) 228 | .collect::>() 229 | } 230 | } 231 | 232 | fn wrap_lines(offset: usize, module_order: &[String], logo_maxlength: usize) -> Vec { 233 | let terminal_width = 234 | handle_error!(any_terminal_size().ok_or(""), "Failed to get terminal size") 235 | .0 236 | .0 as usize; 237 | let mut module_order_wrapped = Vec::new(); 238 | for module in module_order { 239 | let options = textwrap::Options::new(terminal_width - offset - logo_maxlength) 240 | .break_words(true) 241 | .word_separator(textwrap::WordSeparator::UnicodeBreakProperties); 242 | let module_wrapped = textwrap::wrap(module, &options); 243 | module_wrapped 244 | .into_iter() 245 | .for_each(|x| module_order_wrapped.push(x)); 246 | } 247 | 248 | module_order_wrapped 249 | .iter() 250 | .map(std::string::ToString::to_string) 251 | .collect::>() 252 | } 253 | 254 | fn print_classic(&self, wrap_lines: bool) { 255 | let mut sidelogo = self.get_logo(); 256 | let mut order = self.get_module_order(); 257 | let maxlength = self.logo_maxlength(); 258 | if self.wrap_lines && wrap_lines { 259 | order = Self::wrap_lines(self.offset, &order, maxlength); 260 | } 261 | match sidelogo.len().cmp(&order.len()) { 262 | Ordering::Greater => order.resize(sidelogo.len(), String::new()), 263 | Ordering::Less => sidelogo.resize(order.len(), String::new()), 264 | Ordering::Equal => (), 265 | } 266 | 267 | for (i, line) in sidelogo.iter().enumerate() { 268 | println!( 269 | "{}{}{}", 270 | line, 271 | " ".repeat(maxlength - measure_text_width(line) + self.offset), 272 | &order[i] 273 | ); 274 | } 275 | } 276 | 277 | pub fn run_cmd(cmd: &str, error_msg: &str) -> String { 278 | use std::process::Command; 279 | let output = if cfg!(target_os = "windows") { 280 | let command_run = Command::new("cmd").args(["/C", cmd]).output(); 281 | handle_error!(command_run, error_msg) 282 | } else { 283 | let command_run = Command::new("sh").args(["-c", cmd]).output(); 284 | handle_error!(command_run, error_msg) 285 | } 286 | .stdout; 287 | handle_error!( 288 | String::from_utf8(output.clone()), 289 | "Failed to read stdout from command" 290 | ) 291 | .trim() 292 | .to_string() 293 | } 294 | 295 | fn logo_maxlength(&self) -> usize { 296 | if let Some(v) = self 297 | .get_logo() 298 | .iter() 299 | .max_by_key(|&x| measure_text_width(x)) 300 | { 301 | return measure_text_width(v); 302 | } 303 | UserFacingError::new("Failed to find logo line with greatest length") 304 | .help("Make sure that the logo as at least one line.") 305 | .print_and_exit(); 306 | unreachable!() 307 | } 308 | 309 | fn info_maxlength(info: &[String]) -> usize { 310 | if let Some(v) = info.iter().max_by_key(|&x| measure_text_width(x)) { 311 | return measure_text_width(v); 312 | } 313 | UserFacingError::new("Failed to find info line with the greatest length") 314 | .help("Make sure that you have some modules defined.") 315 | .print_and_exit(); 316 | unreachable!() 317 | } 318 | 319 | fn print_side_block(&self, wrap_lines: bool) { 320 | let mut sidelogo = self.get_logo(); 321 | let mut info = self.get_module_order(); 322 | let logo_maxlength = self.logo_maxlength(); 323 | if self.wrap_lines && wrap_lines { 324 | info = Self::wrap_lines( 325 | self.offset + self.format.padding_top + self.format.padding_left + 1 + 2, 326 | &info, 327 | logo_maxlength, 328 | ); 329 | } 330 | if (sidelogo.len()).cmp(&(info.len() + self.format.padding_top + 2)) == Ordering::Less { 331 | sidelogo.resize(info.len() + self.format.padding_top + 2, String::new()); 332 | } 333 | 334 | let mut counter = 0; 335 | 336 | let info_maxlength = Self::info_maxlength(&info); 337 | 338 | println!( 339 | "{}{}{}{}{}", 340 | sidelogo[0], 341 | " ".repeat(logo_maxlength - measure_text_width(&sidelogo[0]) + self.offset), 342 | self.format.top_left_corner_char, 343 | self.format 344 | .horizontal_char 345 | .to_string() 346 | .repeat(info_maxlength + self.format.padding_left + self.format.padding_right), 347 | self.format.top_right_corner_char, 348 | ); 349 | counter += 1; 350 | 351 | for _ in 0..self.format.padding_top { 352 | println!( 353 | "{}{}{vertical}{}{vertical}", 354 | sidelogo[counter], 355 | " ".repeat(logo_maxlength - measure_text_width(&sidelogo[counter]) + self.offset), 356 | " ".repeat(info_maxlength + self.format.padding_right + self.format.padding_left), 357 | vertical = self.format.vertical_char 358 | ); 359 | counter += 1; 360 | } 361 | 362 | for i in &info { 363 | println!( 364 | "{}{}{vertical}{}{}{}{}{vertical}", 365 | sidelogo[counter], 366 | " ".repeat(logo_maxlength - measure_text_width(&sidelogo[counter]) + self.offset), 367 | " ".repeat(self.format.padding_left), 368 | i, 369 | " ".repeat(self.format.padding_right), 370 | " ".repeat(info_maxlength - measure_text_width(i)), 371 | vertical = self.format.vertical_char 372 | ); 373 | counter += 1; 374 | } 375 | 376 | println!( 377 | "{}{}{}{}{}", 378 | sidelogo[counter], 379 | " ".repeat(logo_maxlength - measure_text_width(&sidelogo[counter]) + self.offset), 380 | self.format.bottom_left_corner_char, 381 | self.format 382 | .horizontal_char 383 | .to_string() 384 | .repeat(info_maxlength + self.format.padding_left + self.format.padding_right), 385 | self.format.bottom_right_corner_char, 386 | ); 387 | counter += 1; 388 | 389 | sidelogo.iter().skip(counter).for_each(|i| { 390 | println!("{i}"); 391 | }); 392 | } 393 | 394 | fn print_bottom_block(&self, wrap_lines: bool) { 395 | let sidelogo = self.get_logo(); 396 | let mut info = self.get_module_order(); 397 | if self.wrap_lines && wrap_lines { 398 | info = Self::wrap_lines(self.offset, &info, 0); 399 | } 400 | let info_maxlength = Self::info_maxlength(&info); 401 | 402 | for line in sidelogo { 403 | println!("{line}"); 404 | } 405 | println!( 406 | "{}{}{}", 407 | self.format.top_left_corner_char, 408 | self.format 409 | .horizontal_char 410 | .to_string() 411 | .repeat(info_maxlength + self.format.padding_right + self.format.padding_left), 412 | self.format.top_right_corner_char 413 | ); 414 | for _ in 0..self.format.padding_top { 415 | println!( 416 | "{vertical}{}{vertical}", 417 | " ".repeat(info_maxlength + self.format.padding_right + self.format.padding_left), 418 | vertical = self.format.vertical_char 419 | ); 420 | } 421 | for line in info { 422 | println!( 423 | "{vertical}{}{}{}{}{vertical}", 424 | " ".repeat(self.format.padding_left), 425 | line, 426 | " ".repeat(info_maxlength - measure_text_width(&line)), 427 | " ".repeat(self.format.padding_right), 428 | vertical = self.format.vertical_char 429 | ); 430 | } 431 | println!( 432 | "{}{}{}", 433 | self.format.bottom_left_corner_char, 434 | self.format 435 | .horizontal_char 436 | .to_string() 437 | .repeat(info_maxlength + self.format.padding_left + self.format.padding_right), 438 | self.format.bottom_right_corner_char 439 | ); 440 | } 441 | 442 | pub fn print(&self) { 443 | let matches = Self::get_args(); 444 | let wrap_lines = !matches.no_line_wrap; 445 | matches.mode.map_or_else( 446 | || match self.format.mode { 447 | Mode::Classic => self.print_classic(wrap_lines), 448 | Mode::BottomBlock => self.print_bottom_block(wrap_lines), 449 | Mode::SideBlock => self.print_side_block(wrap_lines), 450 | }, 451 | |v| match v { 452 | Mode::Classic => self.print_classic(wrap_lines), 453 | Mode::BottomBlock => self.print_bottom_block(wrap_lines), 454 | Mode::SideBlock => self.print_side_block(wrap_lines), 455 | }, 456 | ); 457 | } 458 | } 459 | 460 | impl Default for Config { 461 | #[cfg(not(target_os = "windows"))] 462 | fn default() -> Self { 463 | Self { 464 | offset: 4, 465 | wrap_lines: true, 466 | module_order: String::from( 467 | "user delimiter os host kernel uptime packages shell resolution desktop-environment window-manager terminal cpu", 468 | ), 469 | logo_cmd: String::from("auto"), 470 | format: Format::default(), 471 | user: User::default(), 472 | delimiter: Delimiter::default(), 473 | os: Os::default(), 474 | host: Host::default(), 475 | kernel: Kernel::default(), 476 | uptime: Uptime::default(), 477 | custom_modules: HashMap::new(), 478 | packages: Packages::default(), 479 | shell: Shell::default(), 480 | resolution: Resolution::default(), 481 | desktop_environment: DesktopEnvironment::default(), 482 | window_manager: WindowManager::default(), 483 | terminal: Terminal::default(), 484 | cpu: Cpu::default(), 485 | } 486 | } 487 | 488 | #[cfg(target_os = "windows")] 489 | fn default() -> Self { 490 | Self { 491 | offset: 4, 492 | wrap_lines: true, 493 | module_order: String::from("user delimiter os host kernel uptime packages cpu"), 494 | logo_cmd: String::from("auto"), 495 | format: Format::default(), 496 | user: User::default(), 497 | delimiter: Delimiter::default(), 498 | os: Os::default(), 499 | host: Host::default(), 500 | kernel: Kernel::default(), 501 | uptime: Uptime::default(), 502 | custom_modules: HashMap::new(), 503 | packages: Packages::default(), 504 | shell: Shell::default(), 505 | resolution: Resolution::default(), 506 | desktop_environment: DesktopEnvironment::default(), 507 | window_manager: WindowManager::default(), 508 | terminal: Terminal::default(), 509 | cpu: Cpu::default(), 510 | } 511 | } 512 | } 513 | 514 | #[cfg(test)] 515 | mod test { 516 | use pretty_assertions::assert_eq; 517 | 518 | use super::Config; 519 | 520 | #[test] 521 | #[cfg(not(target_os = "windows"))] 522 | fn check_default_config() { 523 | let config = Config::from_config(String::from("config.toml")); 524 | assert_eq!(Config::default(), config); 525 | } 526 | 527 | #[test] 528 | #[cfg(target_os = "windows")] 529 | fn check_default_config() { 530 | let config = Config::from_config(String::from("windows_default.toml")); 531 | assert_eq!(Config::default(), config); 532 | } 533 | 534 | #[test] 535 | fn check_os() { 536 | println!("\n\n{}", Config::default().get_logo().join("\n")); 537 | } 538 | 539 | #[test] 540 | fn check_classic_print() { 541 | let config = Config { 542 | module_order: String::from( 543 | "user user user user user user user user user user user user", 544 | ), 545 | wrap_lines: false, 546 | ..Config::default() 547 | }; 548 | config.print_classic(false); 549 | } 550 | 551 | #[test] 552 | fn check_classic_print_longer_info() { 553 | let config = Config { 554 | module_order: String::from("user user user user user user user user user user user user user user user user user user user user user user user"), 555 | wrap_lines: false, 556 | ..Config::default() 557 | }; 558 | config.print_classic(false); 559 | } 560 | 561 | #[test] 562 | fn check_classic_print_longer_logo() { 563 | let config = Config { 564 | module_order: String::from( 565 | "user user user user user user user user user user user user user", 566 | ), 567 | wrap_lines: false, 568 | ..Config::default() 569 | }; 570 | config.print_classic(false); 571 | } 572 | 573 | #[test] 574 | fn check_side_block_print() { 575 | let config = Config { 576 | module_order: String::from( 577 | "user user user user user user user user user user user user user", 578 | ), 579 | wrap_lines: false, 580 | ..Config::default() 581 | }; 582 | config.print_side_block(false); 583 | } 584 | 585 | #[test] 586 | fn check_side_block_print_longer_info() { 587 | let config = Config { 588 | module_order: String::from("user user user user user user user user user user user user user user user user user user user user user user user"), 589 | wrap_lines: false, 590 | ..Config::default() 591 | }; 592 | config.print_side_block(false); 593 | } 594 | 595 | #[test] 596 | fn check_side_block_print_longer_logo() { 597 | let config = Config { 598 | module_order: String::from("user"), 599 | wrap_lines: false, 600 | ..Config::default() 601 | }; 602 | config.print_side_block(false); 603 | } 604 | 605 | #[test] 606 | fn check_bottom_block_print() { 607 | let config = Config { 608 | module_order: String::from( 609 | "user user user user user user user user user user user user user user", 610 | ), 611 | wrap_lines: false, 612 | ..Config::default() 613 | }; 614 | config.print_bottom_block(false); 615 | } 616 | 617 | #[test] 618 | fn check_bottom_block_print_longer_info() { 619 | let config = Config { 620 | module_order: String::from("user user user user user user user user user user user user user user user user user user user user user user user"), 621 | wrap_lines: false, 622 | ..Config::default() 623 | }; 624 | config.print_bottom_block(false); 625 | } 626 | 627 | #[test] 628 | fn check_bottom_block_print_longer_logo() { 629 | let config = Config { 630 | module_order: String::from("user"), 631 | wrap_lines: false, 632 | ..Config::default() 633 | }; 634 | config.print_bottom_block(false); 635 | } 636 | } 637 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | 9 | ## [0.7.5](https://github.com/devanlooches/rocketfetch/compare/v0.7.4...v0.7.5) - 2024-07-25 10 | 11 | ### Fixed 12 | - *(logo)* Make Arch Linux detection more flexible 13 | - *(logo)* Update Debian logo 14 | 15 | ### Other 16 | - Remove Structopt dependency in favor of Clap 3.X 17 | - Update dependencies 18 | - *(dependencies)* Update dependency versions 19 | - Update .gitignore 20 | - Merge branch 'dev' into main 21 | - *(logo)* Replace logo vectors with files 22 | 23 | 24 | ## 0.7.4 (2023-08-27) 25 | 26 | ### Chore 27 | 28 | - Update dependencies 29 | - Update Libmacchina dependency 30 | 31 | ### Bug Fixes 32 | 33 | - Don't panic when shell version not found 34 | 35 | ### Test 36 | 37 | - Update module tests 38 | 39 | ### Commit Details 40 | 41 | 42 | 43 |
view details 44 | 45 | * **Uncategorized** 46 | - Update dependencies ([`7c6c94a`](https://github.com/devanlooches/rocketfetch/commit/7c6c94ae13926cc1050116af518436e67f4d9e6d)) 47 | - Update module tests ([`a8a0fb0`](https://github.com/devanlooches/rocketfetch/commit/a8a0fb071d37c71cd4de20d75f9a53da88f27b6c)) 48 | - Update Libmacchina dependency ([`be12a34`](https://github.com/devanlooches/rocketfetch/commit/be12a3452cd189d2dda361fa75652bb86394603c)) 49 | - Don't panic when shell version not found ([`5054f9f`](https://github.com/devanlooches/rocketfetch/commit/5054f9f964212947e45886ec3a298d3ea77d1555)) 50 |
51 | 52 | ## 0.7.3 (2022-12-31) 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | ### Chore 80 | 81 | - Update CHANGELOG 82 | - Remove cliff.toml file 83 | - Update CHANGELOG 84 | - Update CHANGELOG 85 | - Add git-cliff configuration 86 | - Update CHANGELOG 87 | 88 | ### Other 89 | 90 | - Fix semver prefix for homebrew version 91 | - Fix semver prefix for homebrew version 92 | - Fix bug with shasum output 93 | - add verbose flag to bump-formula-pr command 94 | - cd into tap directory 95 | - Update tap name 96 | - Add space to last command 97 | - Update tap name 98 | - Add clone repository step 99 | - Debug version number 100 | - Update tap name 101 | - Change to macos platform and update tap name 102 | - Add bump homebrew tap to upload_binaries workflow 103 | - Add upload binaries to github release workflow 104 | 105 | ### Chore 106 | 107 | - Upgrade dependencies 108 | - Add brew installation to README 109 | - Update CHANGELOG 110 | 111 | ### Other 112 | 113 | - Remove publishing workflow 114 | 115 | ### Commit Details 116 | 117 | 118 | 119 |
view details 120 | 121 | * **Uncategorized** 122 | - Release rocketfetch v0.7.3 ([`e5e9dbe`](https://github.com/devanlooches/rocketfetch/commit/e5e9dbedeb3a490275513117b6c5ca1429c06f87)) 123 | - Upgrade dependencies ([`3be5ae2`](https://github.com/devanlooches/rocketfetch/commit/3be5ae2aa71c33e279774aa614be1deca6f357d7)) 124 | - Fix semver prefix for homebrew version ([`d112910`](https://github.com/devanlooches/rocketfetch/commit/d112910cb88e9bcaafe7234907e6e3091f00d13d)) 125 | - Fix semver prefix for homebrew version ([`ce9abca`](https://github.com/devanlooches/rocketfetch/commit/ce9abcace17781bc07bd8614cf01880a7ff78386)) 126 | - Fix bug with shasum output ([`26444d9`](https://github.com/devanlooches/rocketfetch/commit/26444d91d904a95678b8d007ad5968d9be459e10)) 127 | - Add verbose flag to bump-formula-pr command ([`2c16573`](https://github.com/devanlooches/rocketfetch/commit/2c165732dbdd84bb003d636548a92ca19f7d504d)) 128 | - Cd into tap directory ([`dd23b26`](https://github.com/devanlooches/rocketfetch/commit/dd23b2626101b2d6a2c5ae24b7d1a97e3d7c4f4e)) 129 | - Update tap name ([`ccdd0d2`](https://github.com/devanlooches/rocketfetch/commit/ccdd0d2fcad91b3c67866167f990298eaf3fac4c)) 130 | - Add space to last command ([`8a35923`](https://github.com/devanlooches/rocketfetch/commit/8a359236274a9987debf459235b5947e24d86fea)) 131 | - Update tap name ([`3bb8b8f`](https://github.com/devanlooches/rocketfetch/commit/3bb8b8f8d21b738254108a268ca37d6ba8e69a39)) 132 | - Add clone repository step ([`2c0faf3`](https://github.com/devanlooches/rocketfetch/commit/2c0faf3a98a8cb36ad7f1eb9547f118d64ec52ca)) 133 | - Debug version number ([`ceac216`](https://github.com/devanlooches/rocketfetch/commit/ceac2164cd00663bf59cc650321ec90a8ac2b1d8)) 134 | - Update tap name ([`755eabb`](https://github.com/devanlooches/rocketfetch/commit/755eabb8ce0fbff94b155249b1523d4095bd434e)) 135 | - Change to macos platform and update tap name ([`904e222`](https://github.com/devanlooches/rocketfetch/commit/904e222f43994378888f9f258a14b3e761f1dd38)) 136 | - Add bump homebrew tap to upload_binaries workflow ([`f8369ad`](https://github.com/devanlooches/rocketfetch/commit/f8369ad11f6f573027abaaec5ea86d37d87c225a)) 137 | - Add brew installation to README ([`023802c`](https://github.com/devanlooches/rocketfetch/commit/023802cf66445df0d91c9b880a788954ada355ee)) 138 | - Add upload binaries to github release workflow ([`279ecfb`](https://github.com/devanlooches/rocketfetch/commit/279ecfb78beaa2643ab9fe6c4d489e560208121f)) 139 | - Update CHANGELOG ([`4eeab36`](https://github.com/devanlooches/rocketfetch/commit/4eeab3632c037582bc93260667039e89b9b1c40f)) 140 | - Update CHANGELOG ([`0a453ce`](https://github.com/devanlooches/rocketfetch/commit/0a453ced50237363b7a77b06434f17f425b831ad)) 141 | - Remove cliff.toml file ([`b43b69f`](https://github.com/devanlooches/rocketfetch/commit/b43b69f2beea1da1ef2876c4f8a5773eddef4dc9)) 142 | - Update CHANGELOG ([`b96f0c3`](https://github.com/devanlooches/rocketfetch/commit/b96f0c3710e16c5b26b14d04f0b356c1d1a3f09a)) 143 | - Update CHANGELOG ([`4c12302`](https://github.com/devanlooches/rocketfetch/commit/4c12302ad6d82c401fbeb9a4d956e645139522b3)) 144 | - Add git-cliff configuration ([`73a22ab`](https://github.com/devanlooches/rocketfetch/commit/73a22ab9d2c9a857e3e5ea22ea16082c39ded65c)) 145 | - Remove publishing workflow ([`0587426`](https://github.com/devanlooches/rocketfetch/commit/0587426ad5553e21e1594e411c7eba6d6fc981a4)) 146 | - Update CHANGELOG ([`07816a7`](https://github.com/devanlooches/rocketfetch/commit/07816a703d148ac5a56dcef8769cc464d80652fb)) 147 |
148 | 149 | ## v0.7.2 (2022-11-24) 150 | 151 | 152 | 153 | ### Other 154 | 155 | - Remove unused dependencies 156 | 157 | ### Performance 158 | 159 | - Switch to scoped threads and removing cloning 160 | 161 | ### Commit Details 162 | 163 | 164 | 165 |
view details 166 | 167 | * **Uncategorized** 168 | - Release rocketfetch v0.7.2 ([`bc66284`](https://github.com/devanlooches/rocketfetch/commit/bc662840ff776bf8a9143b6f36527d24200ef40a)) 169 | - Switch to scoped threads and removing cloning ([`f3309fd`](https://github.com/devanlooches/rocketfetch/commit/f3309fd1b16d88bc3968597f5aa6a46b1f54e695)) 170 | - Remove unused dependencies ([`d7a023b`](https://github.com/devanlooches/rocketfetch/commit/d7a023b764c69e209c155a93e840c6da16482760)) 171 |
172 | 173 | ## v0.7.1 (2022-11-06) 174 | 175 | 176 | 177 | 178 | 179 | ### Chore 180 | 181 | - Release new version 182 | - Update dependency versions 183 | - Update changelog 184 | 185 | ### Commit Details 186 | 187 | 188 | 189 |
view details 190 | 191 | * **Uncategorized** 192 | - Release new version ([`5665006`](https://github.com/devanlooches/rocketfetch/commit/5665006b39ea38991784c7278e272e6f0a3a3928)) 193 | - Update dependency versions ([`1f6c8be`](https://github.com/devanlooches/rocketfetch/commit/1f6c8bebb354b039ddf9ca600a0b43f2a776a439)) 194 | - Update changelog ([`155452d`](https://github.com/devanlooches/rocketfetch/commit/155452da8d55f933299d29cbe0a262b94be9a35e)) 195 |
196 | 197 | ## v0.7.0 (2022-11-06) 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | ### Chore 221 | 222 | - Update versions 223 | - Update versions 224 | - Add changelog 225 | 226 | ### New Features 227 | 228 | - Added windows support 229 | - Add ubuntu OS Support 230 | 231 | ### Bug Fixes 232 | 233 | - Fix os name for windows 234 | - Setup for windows to work without unimplemented features out of the box 235 | - Fix macos logo fetching function 236 | - fix windows logo function 237 | - Fix os-detection on linux 238 | 239 | ### Other 240 | 241 | - Update workflow 242 | - Update workflow 243 | - Add windows test 244 | - Update workflow 245 | 246 | ### Refactor 247 | 248 | - Refactor logo fetching functions 249 | 250 | ### Test 251 | 252 | - Update defaults for windows 253 | - Update linux tests 254 | - Update linux tests 255 | - Update linux tests 256 | - Update linux tests 257 | - Update tests to reflect unimplemented functions 258 | - Add seperate linux tests 259 | - Add seperate windows tests taking out unimplemented features 260 | - Fix tests for workflow 261 | - Update tests 262 | - Ignore certain tests for workflow 263 | - Add more tests for workflow 264 | 265 | ### Commit Details 266 | 267 | 268 | 269 |
view details 270 | 271 | * **Uncategorized** 272 | - Update versions ([`85c2d00`](https://github.com/devanlooches/rocketfetch/commit/85c2d00ddf8d355c639fd47589e1f783feee2ea0)) 273 | - Update versions ([`5a0d8cf`](https://github.com/devanlooches/rocketfetch/commit/5a0d8cf0c85a8218c34f48dde1f6024212f1787b)) 274 | - Update defaults for windows ([`9345314`](https://github.com/devanlooches/rocketfetch/commit/9345314fe7e64f6c659439122aacc96250879a59)) 275 | - Fix os name for windows ([`0fa2bed`](https://github.com/devanlooches/rocketfetch/commit/0fa2bed0f7f1b1195b34dc557399ab110a055dd6)) 276 | - Update linux tests ([`c1d47bd`](https://github.com/devanlooches/rocketfetch/commit/c1d47bdf405adda543181feea144d0f6839a94c8)) 277 | - Update linux tests ([`de24cf5`](https://github.com/devanlooches/rocketfetch/commit/de24cf54b1308467ae9f952193fbfb6621cfdb9c)) 278 | - Update linux tests ([`6ee2026`](https://github.com/devanlooches/rocketfetch/commit/6ee2026dfaee58026d7981d98b56102e3818926a)) 279 | - Update linux tests ([`d32c9d6`](https://github.com/devanlooches/rocketfetch/commit/d32c9d6457db811f93df4b150e98769219e86d4a)) 280 | - Update tests to reflect unimplemented functions ([`b2d5ece`](https://github.com/devanlooches/rocketfetch/commit/b2d5eceed56f8c4f20af2d3017821a28f4b1b319)) 281 | - Add seperate linux tests ([`da18ea1`](https://github.com/devanlooches/rocketfetch/commit/da18ea1e198723c7558e5bacfbc45c9ae79fe4a5)) 282 | - Setup for windows to work without unimplemented features out of the box ([`799d46b`](https://github.com/devanlooches/rocketfetch/commit/799d46bf468f97792a52c28aa97de891b57c86a1)) 283 | - Add seperate windows tests taking out unimplemented features ([`8d6e3a8`](https://github.com/devanlooches/rocketfetch/commit/8d6e3a88523ab601bed981234642f27c2f1d7d8c)) 284 | - Fix macos logo fetching function ([`6aa488d`](https://github.com/devanlooches/rocketfetch/commit/6aa488dba9e9a045e9a48d10c600f496e68db48d)) 285 | - Fix windows logo function ([`2eb5f0c`](https://github.com/devanlooches/rocketfetch/commit/2eb5f0c4f9e2599f9c65b50d45b9b543fd2519e2)) 286 | - Added windows support ([`7f6c559`](https://github.com/devanlooches/rocketfetch/commit/7f6c5593f028e34dff7fe04b4d2c8a0248848b66)) 287 | - Fix os-detection on linux ([`e6c36f8`](https://github.com/devanlooches/rocketfetch/commit/e6c36f8f74b83474dc74649d0e3198a5da607374)) 288 | - Refactor logo fetching functions ([`4cf4b28`](https://github.com/devanlooches/rocketfetch/commit/4cf4b2848636cbc695e549c425caee97fdcdc74d)) 289 | - Update workflow ([`85cd368`](https://github.com/devanlooches/rocketfetch/commit/85cd368c75bd39454c2d8bcb4c2b10ae4589e53f)) 290 | - Fix tests for workflow ([`109d7fe`](https://github.com/devanlooches/rocketfetch/commit/109d7feeb88ffad281d0862bfb750eab4e29d270)) 291 | - Update tests ([`0a53c0d`](https://github.com/devanlooches/rocketfetch/commit/0a53c0d0903553ec6c7b21dd4ce2b499c815b21d)) 292 | - Update workflow ([`865df1a`](https://github.com/devanlooches/rocketfetch/commit/865df1ab19bc82491bc04fe0cea0c071c52cc12d)) 293 | - Ignore certain tests for workflow ([`971e622`](https://github.com/devanlooches/rocketfetch/commit/971e622f033f6066e8628712a01e55c208d71d71)) 294 | - Add ubuntu OS Support ([`0de451e`](https://github.com/devanlooches/rocketfetch/commit/0de451e5abca416046c20706b89800aa3490281b)) 295 | - Add windows test ([`6550dbd`](https://github.com/devanlooches/rocketfetch/commit/6550dbda692983c5e43d7ad80d49f2a2c97104de)) 296 | - Update workflow ([`12bfa8a`](https://github.com/devanlooches/rocketfetch/commit/12bfa8a36dc8bb130e7284c866f83feb38394d03)) 297 | - Add more tests for workflow ([`b8769d2`](https://github.com/devanlooches/rocketfetch/commit/b8769d229e7730519b9696dd7dee972542276098)) 298 | - Add changelog ([`fe55d16`](https://github.com/devanlooches/rocketfetch/commit/fe55d16585dfc3b385c1fc5df6a2db767bbd9c3b)) 299 |
300 | 301 | ## v0.6.13 (2022-11-05) 302 | 303 | 304 | 305 | 306 | 307 | ### Other 308 | 309 | - Fix publish workflow 310 | - Fix publishing workflow 311 | 312 | ### Refactor 313 | 314 | - Listen to clippy 315 | 316 | ### Commit Details 317 | 318 | 319 | 320 |
view details 321 | 322 | * **Uncategorized** 323 | - Fix publish workflow ([`a3efd60`](https://github.com/devanlooches/rocketfetch/commit/a3efd60047d7eb19490b961faead6e09c94cf432)) 324 | - Listen to clippy ([`94b6781`](https://github.com/devanlooches/rocketfetch/commit/94b6781b9926fff66de636926d8da93811aedd20)) 325 | - Fix publishing workflow ([`ff9e099`](https://github.com/devanlooches/rocketfetch/commit/ff9e0996cb617ba832afbd347ce35704f48eb3b2)) 326 |
327 | 328 | ## v0.6.12 (2022-11-05) 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | ### Chore 353 | 354 | - Rename job in github workflow 355 | 356 | ### Bug Fixes 357 | 358 | - Fix style of side-block mode 359 | - Fix top padding functionality 360 | - Add ability to disable line wrap 361 | - Add option to disable line wrap 362 | - Fix github workflow 363 | - Fix github workflow 364 | 365 | ### Other 366 | 367 | - Add publish workflow 368 | - Update workflow 369 | - Update workflow 370 | - Update workflow 371 | - Update workflow 372 | - Update workflow 373 | - Update workflow 374 | - Update workflow 375 | - Update workflow 376 | - Add publish to crates.io action 377 | - Capture stdout of tests 378 | - Add archlinux job 379 | - Add archlinux os 380 | - Add job for archlinux 381 | - Add seperate config file for workflow 382 | - Add seperate rocketfetch configuration for the workflow 383 | - Update workflow 384 | 385 | ### Refactor 386 | 387 | - Remove unneeded error handling 388 | 389 | ### Test 390 | 391 | - Add tests for github-workflows 392 | - Add tests for ci 393 | 394 | ### Commit Details 395 | 396 | 397 | 398 |
view details 399 | 400 | * **Uncategorized** 401 | - Add publish workflow ([`9b85f05`](https://github.com/devanlooches/rocketfetch/commit/9b85f05234e38d5bb6bf9d3f15cfef2a3a74f151)) 402 | - Update workflow ([`bdb71b8`](https://github.com/devanlooches/rocketfetch/commit/bdb71b8984cdcf8d3b9e3c49b022ae804d3592e4)) 403 | - Update workflow ([`8c7252b`](https://github.com/devanlooches/rocketfetch/commit/8c7252bea2de41f6e0e029ea4ee891ddca1072f8)) 404 | - Update workflow ([`b3d7966`](https://github.com/devanlooches/rocketfetch/commit/b3d796607864486dba457605f7679d146bec8ff2)) 405 | - Update workflow ([`d830fd5`](https://github.com/devanlooches/rocketfetch/commit/d830fd5fa4071c408f68265f06dd7c4579958c7f)) 406 | - Update workflow ([`0772fd3`](https://github.com/devanlooches/rocketfetch/commit/0772fd37882dcde348759ac091aacb74b7719024)) 407 | - Update workflow ([`afdae4d`](https://github.com/devanlooches/rocketfetch/commit/afdae4d4d1c6e8b3ddadea6ac20dbfa06ae08166)) 408 | - Update workflow ([`e4d50e9`](https://github.com/devanlooches/rocketfetch/commit/e4d50e9431a74536a955ad25423c92c73c954ad4)) 409 | - Update workflow ([`1c4dd8b`](https://github.com/devanlooches/rocketfetch/commit/1c4dd8b9626f08996752b52c12889ca435aa5131)) 410 | - Add publish to crates.io action ([`9cf0643`](https://github.com/devanlooches/rocketfetch/commit/9cf064366ef7a47fcf3bc2dd75ef0fb169888418)) 411 | - Fix style of side-block mode ([`152ab4d`](https://github.com/devanlooches/rocketfetch/commit/152ab4d5c5b29033a8fd1d199a62839bcea88d5b)) 412 | - Fix top padding functionality ([`e58a32e`](https://github.com/devanlooches/rocketfetch/commit/e58a32e2d654205152a12c0097aacdd34d685671)) 413 | - Remove unneeded error handling ([`da0c66f`](https://github.com/devanlooches/rocketfetch/commit/da0c66f04601d8ef6e58f13ac81e1830cadcb461)) 414 | - Add tests for github-workflows ([`d1ade04`](https://github.com/devanlooches/rocketfetch/commit/d1ade04fc789acc94a531b531a8299e36f198046)) 415 | - Capture stdout of tests ([`73157b7`](https://github.com/devanlooches/rocketfetch/commit/73157b796bba9dcc1574ed836bd632a523d5ef3e)) 416 | - Add tests for ci ([`c14c5f9`](https://github.com/devanlooches/rocketfetch/commit/c14c5f946a60931329fd4a554c72ebf12794f7e9)) 417 | - Add archlinux job ([`4062ed8`](https://github.com/devanlooches/rocketfetch/commit/4062ed8f948fcab666e218375eae48fd42e51ab0)) 418 | - Add archlinux os ([`3dd643c`](https://github.com/devanlooches/rocketfetch/commit/3dd643cfb69f48183e33c5c2e021340780365a60)) 419 | - Add job for archlinux ([`45f1046`](https://github.com/devanlooches/rocketfetch/commit/45f1046b4332e49c24a8dc72535fe216a4115c40)) 420 | - Add seperate config file for workflow ([`11e95d8`](https://github.com/devanlooches/rocketfetch/commit/11e95d89c48d1de17b85b9cc2cff10fd099a446d)) 421 | - Add ability to disable line wrap ([`dc22133`](https://github.com/devanlooches/rocketfetch/commit/dc2213396b523912da2128407fbfcf58fd610225)) 422 | - Add option to disable line wrap ([`f32041f`](https://github.com/devanlooches/rocketfetch/commit/f32041f7fa24842aadcd544eaf3dd4f86e57ca92)) 423 | - Add seperate rocketfetch configuration for the workflow ([`b9901a4`](https://github.com/devanlooches/rocketfetch/commit/b9901a4a4c2e6ae8fbc6e5691d2dcb18abf27f6c)) 424 | - Update workflow ([`218670a`](https://github.com/devanlooches/rocketfetch/commit/218670a75e3680ae827bb1abf1a07729f0f5fef1)) 425 | - Fix github workflow ([`e8926c6`](https://github.com/devanlooches/rocketfetch/commit/e8926c6996e03c0ee5568e494d28c0ec1061799a)) 426 | - Fix github workflow ([`4905f9f`](https://github.com/devanlooches/rocketfetch/commit/4905f9f05dbf4c2e0eb13b65ae9ba946d8d6093c)) 427 | - Rename job in github workflow ([`cb0062c`](https://github.com/devanlooches/rocketfetch/commit/cb0062c92582f3e1bb40db5904dae4f317c2b796)) 428 | - Update Github action ([`0ee1aed`](https://github.com/devanlooches/rocketfetch/commit/0ee1aed559dd3f74f3e7cf8d2ec95f688bad2710)) 429 | - Add Github Actions ([`8150fcd`](https://github.com/devanlooches/rocketfetch/commit/8150fcd709597f9d4cdcd3aa1c5340633847d41d)) 430 |
431 | 432 | ## v0.6.9 (2022-10-01) 433 | 434 | 435 | 436 | 437 | ### Chore 438 | 439 | - Update version 440 | 441 | ### Other 442 | 443 | - Fix build errors and update all dependencies 444 | 445 | ### Commit Details 446 | 447 | 448 | 449 |
view details 450 | 451 | * **Uncategorized** 452 | - Update version ([`632789a`](https://github.com/devanlooches/rocketfetch/commit/632789a09c34f73e428c8d15fd7028038e9b79d3)) 453 | - Fix build errors and update all dependencies ([`a9340f2`](https://github.com/devanlooches/rocketfetch/commit/a9340f27b997d7a69fc2a5666c5ceba41ffe1083)) 454 | - Roll back one commit to fix error ([`ec94d66`](https://github.com/devanlooches/rocketfetch/commit/ec94d66fa2c4cef3424d6441b8e7390e932a8551)) 455 | - Update Version ([`6c13e2b`](https://github.com/devanlooches/rocketfetch/commit/6c13e2b63dcac523ec627022e7ce1e5b9c19a68b)) 456 | - Update Version ([`9d5a9c1`](https://github.com/devanlooches/rocketfetch/commit/9d5a9c1aa6f49ac4d7ff9e7a8001ec27a7ea8de1)) 457 | - Update todo list in README ([`b9ddfbd`](https://github.com/devanlooches/rocketfetch/commit/b9ddfbd5a0751fb982ec5b3e500587135334d1a5)) 458 |
459 | 460 | ## v0.6.4 (2022-05-28) 461 | 462 | ### Commit Details 463 | 464 | 465 | 466 |
view details 467 | 468 | * **Uncategorized** 469 | - Fix clippy warnings and fix line wrapping ([`45cd61a`](https://github.com/devanlooches/rocketfetch/commit/45cd61a154a8b814c11fdc580452e883b9dcdcc2)) 470 | - Bump dependencies and update version ([`11b7f0f`](https://github.com/devanlooches/rocketfetch/commit/11b7f0fc2b01f23c0ef1cf8815d3aa98d022d312)) 471 | - Fix unknown field for custom modules, fix trailing white space, fix panic on length of messages longer than length of logo ([`aad91e2`](https://github.com/devanlooches/rocketfetch/commit/aad91e2cb97e76a65b4b5771d34140d6c2dfaa90)) 472 | - Update README ([`b07eb73`](https://github.com/devanlooches/rocketfetch/commit/b07eb738e6f525fb76d62cb28a9e03ef56a4beef)) 473 | - Trim output to prevent line breaks ([`2c09045`](https://github.com/devanlooches/rocketfetch/commit/2c090454a9c10c6b9214a40a3c99463f31825a86)) 474 |
475 | 476 | ## v0.6.2 (2022-01-17) 477 | 478 | ### Commit Details 479 | 480 | 481 | 482 |
view details 483 | 484 | * **Uncategorized** 485 | - Fix unicode formatting issue ([`aee32c8`](https://github.com/devanlooches/rocketfetch/commit/aee32c8b5f6ef56f9e7d1f0833fb114600ae8fd3)) 486 | - Fix unicode formatting issue ([`288ef3e`](https://github.com/devanlooches/rocketfetch/commit/288ef3e19cf6610be2b36f01699da1dde8c41975)) 487 | - Add line wrapping when the terminal is too small ([`43ef5a6`](https://github.com/devanlooches/rocketfetch/commit/43ef5a6d07a2b9025c1386afafc15fee1f700a25)) 488 | - Add some new modules ([`96b9fd4`](https://github.com/devanlooches/rocketfetch/commit/96b9fd43c17f5df37c874eb15799e5daa922f232)) 489 | - Rewrite with multithreading instead of async for faster run time ([`c6ca27f`](https://github.com/devanlooches/rocketfetch/commit/c6ca27face5b5f0852ff5067425cce17328667d3)) 490 | - Update version ([`4d70739`](https://github.com/devanlooches/rocketfetch/commit/4d70739c8b68635bf989905a7abe91a9f05fc799)) 491 | - Update README ([`3fdaa85`](https://github.com/devanlooches/rocketfetch/commit/3fdaa85d3213cd858971573c36cce1408e5374d6)) 492 | - Merge pull request #2 from mattfbacon/spellcheck ([`d6427cc`](https://github.com/devanlooches/rocketfetch/commit/d6427cc71daf41bd011908590deeed935943401a)) 493 | - Merge pull request #1 from mattfbacon/archlinux-logo ([`ec7e619`](https://github.com/devanlooches/rocketfetch/commit/ec7e619caf43a1bbe2bd40f14d49e95df6a6f262)) 494 | - Correct spelling in README.md ([`b12db6a`](https://github.com/devanlooches/rocketfetch/commit/b12db6a1e1c19798bafd6ce3cc8b567d07d325fe)) 495 | - Borrow str ([`aa3f6af`](https://github.com/devanlooches/rocketfetch/commit/aa3f6af024d7c79943e54ebf8ea6ad6df371cbb0)) 496 | - Add Arch Linux logo ([`e7c14a0`](https://github.com/devanlooches/rocketfetch/commit/e7c14a03405ea51aa8a9c95f22502248c2b21a8c)) 497 |
498 | 499 | ## v0.5.9 (2021-11-21) 500 | 501 | ### Commit Details 502 | 503 | 504 | 505 |
view details 506 | 507 | * **Uncategorized** 508 | - Change Crates ([`6874172`](https://github.com/devanlooches/rocketfetch/commit/68741727a63d6f315c8e3a8726d009d3697b9139)) 509 | - Merge branch 'main' of github.com:devanlooches/rustfetch ([`3bb1ba1`](https://github.com/devanlooches/rocketfetch/commit/3bb1ba1448f67802c7b36c9693db792e54eadab3)) 510 | - Switch to edition 2021 ([`302b2b8`](https://github.com/devanlooches/rocketfetch/commit/302b2b858981e6c0d47ce02426d88c57d52841ab)) 511 | - Switch to edition 2021 ([`8ca5fc8`](https://github.com/devanlooches/rocketfetch/commit/8ca5fc83b8ef5bbb5fc1c8ba4290fb459046b730)) 512 | - Upgrade Dependencies ([`2f9c947`](https://github.com/devanlooches/rocketfetch/commit/2f9c9476771b2c054c0251b2cbb4b3a97a90aef4)) 513 | - Fix mode error messages ([`5ed96a6`](https://github.com/devanlooches/rocketfetch/commit/5ed96a67433c789dcc402e1c1cac37500049fb0c)) 514 | - Update tests ([`92708a0`](https://github.com/devanlooches/rocketfetch/commit/92708a0b65b8b5fc141701aaa14ab920c064ea5d)) 515 | - Change Version number for cargo ([`8aaf612`](https://github.com/devanlooches/rocketfetch/commit/8aaf612849185b45e360deb52a17ff2eab630116)) 516 | - Add Package counting ([`feb596b`](https://github.com/devanlooches/rocketfetch/commit/feb596b98bd71410f649c6da1a590c375d8997e3)) 517 |
518 | 519 | ## v0.5.4 (2021-07-30) 520 | 521 | ### Commit Details 522 | 523 | 524 | 525 |
view details 526 | 527 | * **Uncategorized** 528 | - Change version on ClI Portion ([`0ba7f6c`](https://github.com/devanlooches/rocketfetch/commit/0ba7f6c892cfae4f9bb6e13accf4b064d9c855e7)) 529 |
530 | 531 | ## v0.5.3 (2021-07-30) 532 | 533 | ### Commit Details 534 | 535 | 536 | 537 |
view details 538 | 539 | * **Uncategorized** 540 | - Change version on ClI Portion ([`6c69656`](https://github.com/devanlooches/rocketfetch/commit/6c6965688fae61e5a7ad30c4884048c1e18a6919)) 541 | - Change version on ClI Portion ([`e690df3`](https://github.com/devanlooches/rocketfetch/commit/e690df3fec924ebe8a60a2818d2dfd32287a656d)) 542 |
543 | 544 | ## v0.5.2 (2021-07-30) 545 | 546 | ### Commit Details 547 | 548 | 549 | 550 |
view details 551 | 552 | * **Uncategorized** 553 | - Update version ([`c8889b4`](https://github.com/devanlooches/rocketfetch/commit/c8889b46e76b6a04ec25731954a8d655b9b6c4f7)) 554 | - Fix Spelling Error: Separator vs. Seperator ([`8a4a2ca`](https://github.com/devanlooches/rocketfetch/commit/8a4a2caf8b0ef31e1b7ca0f0d874d136d0a0c421)) 555 | - Update README.md ([`520ee23`](https://github.com/devanlooches/rocketfetch/commit/520ee23a1205cd268c0597c3f4fb44bdedd3457a)) 556 | - Update version ([`fb63096`](https://github.com/devanlooches/rocketfetch/commit/fb63096b199d14baead2d7f4663eb8747a8c5326)) 557 | - Update toml.pest ([`886fe26`](https://github.com/devanlooches/rocketfetch/commit/886fe2667d8d39230fc0c0c667d872b92b6a693c)) 558 |
559 | 560 | ## v0.5.0 (2021-07-29) 561 | 562 | ### Commit Details 563 | 564 | 565 | 566 |
view details 567 | 568 | * **Uncategorized** 569 | - Add better error checking for configuration file ([`f2fea0b`](https://github.com/devanlooches/rocketfetch/commit/f2fea0b716cc87e6be9b4892065677a5973194c0)) 570 | - Add Uptime Module ([`ca87888`](https://github.com/devanlooches/rocketfetch/commit/ca87888d5f2440604e9c401070dae4078de01e73)) 571 | - Update README.md ([`be9b191`](https://github.com/devanlooches/rocketfetch/commit/be9b191c3b70b8adea69f524120f25b6fc0e167c)) 572 |
573 | 574 | ## v0.3.0 (2021-07-18) 575 | 576 | ### Commit Details 577 | 578 | 579 | 580 |
view details 581 | 582 | * **Uncategorized** 583 | - Add Kernel Module ([`078ec17`](https://github.com/devanlooches/rocketfetch/commit/078ec171bd9b5b573985a3358ea0de08b92650bb)) 584 | - Update version ([`63fb6fa`](https://github.com/devanlooches/rocketfetch/commit/63fb6fae01c6ed05c3ec4151e9613d861b52993e)) 585 |
586 | 587 | ## v0.2.5 (2021-07-17) 588 | 589 | ### Commit Details 590 | 591 | 592 | 593 |
view details 594 | 595 | * **Uncategorized** 596 | - Add Host Module ([`8af6824`](https://github.com/devanlooches/rocketfetch/commit/8af6824a32132aef644d1e66744f5b53b3b6b871)) 597 | - Add Host Module ([`84a83d1`](https://github.com/devanlooches/rocketfetch/commit/84a83d1d0a12ad22db98fe55f385cb4a452ba2e4)) 598 | - Update Cargo.toml ([`9a75b97`](https://github.com/devanlooches/rocketfetch/commit/9a75b97634807b1bf2ab088d304e8190cb18280c)) 599 | - Update Cargo.toml ([`9ccdd5e`](https://github.com/devanlooches/rocketfetch/commit/9ccdd5e50dc45e670fdb73f0ef0c92f468f1514a)) 600 | - Update Cargo.toml ([`27d7c79`](https://github.com/devanlooches/rocketfetch/commit/27d7c7911f79f0185048805a2d43c07a98676c43)) 601 | - Update Cargo.toml ([`7450eed`](https://github.com/devanlooches/rocketfetch/commit/7450eed21c63a492035a07d5e9367e648d9f05bf)) 602 | - Update Cargo.toml ([`3ee9763`](https://github.com/devanlooches/rocketfetch/commit/3ee9763d2126597d36fc3716457db87afa4d2091)) 603 | - Update Cargo.toml ([`956927f`](https://github.com/devanlooches/rocketfetch/commit/956927fb9ca5b42df35c724c32cfa91054eb1fd8)) 604 | - Update Cargo.toml ([`e12f82b`](https://github.com/devanlooches/rocketfetch/commit/e12f82bf31031245522aa2f78a145aac6c9842a1)) 605 | - Update Cargo.toml ([`400492b`](https://github.com/devanlooches/rocketfetch/commit/400492bef31f598b5ccb8e711875b08aacbf50a7)) 606 | - Update Cargo.toml ([`053969a`](https://github.com/devanlooches/rocketfetch/commit/053969af2211ee4df6b169820a502a247a05b7b2)) 607 | - Merge branch 'main' of github.com:devanlooches/rustfetch ([`e61a9a9`](https://github.com/devanlooches/rocketfetch/commit/e61a9a9cf0f94ead1920d2e88e1e24be1ac285a7)) 608 | - Update Cargo.toml ([`4220af7`](https://github.com/devanlooches/rocketfetch/commit/4220af77cb364b0f0321c1d2ff92d55d4d7b3195)) 609 | - Add badge ([`1838f45`](https://github.com/devanlooches/rocketfetch/commit/1838f452eb821a8247fe8863b52898b268e28044)) 610 | - Update README.md ([`f207de9`](https://github.com/devanlooches/rocketfetch/commit/f207de9ff9063d4794e3f0ed782d807202b7471c)) 611 | - Update README ([`1ab120d`](https://github.com/devanlooches/rocketfetch/commit/1ab120d204b5cc2cfbc97ce044b4ecf472e9101f)) 612 | - Update README ([`f8712c2`](https://github.com/devanlooches/rocketfetch/commit/f8712c29a5708387d381a9bbc29b8a739c7b7cc6)) 613 | - Update README ([`d5db86b`](https://github.com/devanlooches/rocketfetch/commit/d5db86b03cfc486a47bb96a982ef3812d2d7f802)) 614 | - Update Cargo.toml ([`704263c`](https://github.com/devanlooches/rocketfetch/commit/704263c50ccdb17e4694e1a3af0efd793353d73a)) 615 | - Update Cargo.toml ([`b0514cc`](https://github.com/devanlooches/rocketfetch/commit/b0514cc09bd8d6ea9b5e4ddfec869c5318da835d)) 616 | - Fix Macos Logo ([`30e2705`](https://github.com/devanlooches/rocketfetch/commit/30e2705fd8275313df24e663b8f325fe0a4ac887)) 617 | - Fix Warning ([`2e68855`](https://github.com/devanlooches/rocketfetch/commit/2e688552ab6ee9858953a362efa759d185edc705)) 618 | - Update Cargo.toml ([`7e5ec63`](https://github.com/devanlooches/rocketfetch/commit/7e5ec6301bcc43c90d23ec8541f3fa86f6410e2c)) 619 | - Update Cargo.toml ([`4577f33`](https://github.com/devanlooches/rocketfetch/commit/4577f3342cfc337cbf388a00e2ccf93bd383ea66)) 620 | - Update Cargo.toml ([`456f7a1`](https://github.com/devanlooches/rocketfetch/commit/456f7a178e4a4005db776a430e75d9d5c12ca5f1)) 621 | - Add custom modules ([`f91bb48`](https://github.com/devanlooches/rocketfetch/commit/f91bb4871363de93b4cc5fcef11d637d2393f184)) 622 | - Finish README for modules so far and add padding seperately for each side ([`87bf74d`](https://github.com/devanlooches/rocketfetch/commit/87bf74d80cdd98cd57f146fe128696d06ed9cfbe)) 623 | - Update README ([`5c15bab`](https://github.com/devanlooches/rocketfetch/commit/5c15bab0c90d525c284d9cb1aeeba854248111bd)) 624 | - Update README ([`bfe93a7`](https://github.com/devanlooches/rocketfetch/commit/bfe93a7d268dcfb462d665d1f68e968000add60f)) 625 | - Update README ([`3b9b5fc`](https://github.com/devanlooches/rocketfetch/commit/3b9b5fc6cc7eea066121cb0e92405d322ce5d3d3)) 626 | - Add README ([`daa98d9`](https://github.com/devanlooches/rocketfetch/commit/daa98d9c2f435f928bfb2506d3ed5dade539034e)) 627 | - Update description ([`fc12260`](https://github.com/devanlooches/rocketfetch/commit/fc12260493787c236c1424f2818c44cc66b22704)) 628 | - Update parse_config test ([`645b21a`](https://github.com/devanlooches/rocketfetch/commit/645b21ac362cfe486c0808849910792618b5ebe2)) 629 | - Added os module ([`4d396f0`](https://github.com/devanlooches/rocketfetch/commit/4d396f06cc05afc774c093b1df2fdc46ed8f2f47)) 630 | - Added test for configuration parsing ([`bc23d27`](https://github.com/devanlooches/rocketfetch/commit/bc23d27cad305fcedd7daaf0c112c7b43173b66e)) 631 | - Added os detection ([`6109964`](https://github.com/devanlooches/rocketfetch/commit/6109964f08ebeb55a73bd9807568350d1af2b3c3)) 632 | - Remove all unwraps and expects ([`0c77e32`](https://github.com/devanlooches/rocketfetch/commit/0c77e3279a259a21cfb8a1250575ad9b8c54a41f)) 633 | - Added delimiter module ([`cdf1106`](https://github.com/devanlooches/rocketfetch/commit/cdf1106fc7879a3ae4c3cb0c12fc2355acda66cd)) 634 | - Fix Warnings and Mistake in bottom-table mode ([`a4bbf9a`](https://github.com/devanlooches/rocketfetch/commit/a4bbf9a22c66ac0012de72f349d396e4490911f3)) 635 | - Added bottom-table mode ([`28e615d`](https://github.com/devanlooches/rocketfetch/commit/28e615dcf28854a15533fb818ff89420dfea4b8b)) 636 | - Added side-table mode ([`4a1bfb8`](https://github.com/devanlooches/rocketfetch/commit/4a1bfb8677f1dcd936216cdfb65e90540ac547c7)) 637 | - Fix warning for default configuration not found ([`7f7a9d1`](https://github.com/devanlooches/rocketfetch/commit/7f7a9d1df9908cdd9c93ff8dc96b2ae743d408c9)) 638 | - Finished get_info method for user ([`1508ed8`](https://github.com/devanlooches/rocketfetch/commit/1508ed8ec062f597da2ef31a42219946631b54bf)) 639 | - Finalized Mode detection from arguments and config file ([`9f2a151`](https://github.com/devanlooches/rocketfetch/commit/9f2a15167fdec3481f29c1bee7467106ed173e85)) 640 | - Fix -c option help value ([`99de0f7`](https://github.com/devanlooches/rocketfetch/commit/99de0f775a3046346ae649ab3705f91c4a3a50f3)) 641 | - Added help values to cli and fixed mode to be unrequired and have a default value ([`cdb76b4`](https://github.com/devanlooches/rocketfetch/commit/cdb76b4be7166e227116daf8d0959b984862f6f4)) 642 | - Fix clippy warnings ([`9fb0ffc`](https://github.com/devanlooches/rocketfetch/commit/9fb0ffcadc4624a9cb7723d73e2a26237403a66f)) 643 | - Finished the cli part ([`e71be44`](https://github.com/devanlooches/rocketfetch/commit/e71be442fcd1558acbd0f766680dd2b962dce803)) 644 | - Added classic print method ([`506397e`](https://github.com/devanlooches/rocketfetch/commit/506397e5d79438f21d79de40d32713cc46d33ea4)) 645 | - Added methods ([`bd91de5`](https://github.com/devanlooches/rocketfetch/commit/bd91de5da36b555430cbbff80830a41458e45c82)) 646 | - Added from_config method ([`0c54470`](https://github.com/devanlooches/rocketfetch/commit/0c54470dd50643b6df2f853e464095f1c6797c34)) 647 | - Update Gitignore ([`5234893`](https://github.com/devanlooches/rocketfetch/commit/523489345ce85bae8fde186a41025eba1437f83c)) 648 | - Initial Commit ([`446b98c`](https://github.com/devanlooches/rocketfetch/commit/446b98c5fe231e835ba4f30c80a668ac4cb73939)) 649 |
650 | 651 | ## v0.2.0 (2021-07-18) 652 | 653 | ### Commit Details 654 | 655 | 656 | 657 |
view details 658 | 659 | * **Uncategorized** 660 | - Update README.md ([`7228604`](https://github.com/devanlooches/rocketfetch/commit/72286045563371736fe376f664b7f7300ab9aaa1)) 661 | - Fix Side-Table and remove bottom padding option ([`0607f50`](https://github.com/devanlooches/rocketfetch/commit/0607f5023ccd14eebbc7ba1fe3f5db62a4b9c4d5)) 662 | - Fix Side-Table and remove bottom padding option ([`f209b7d`](https://github.com/devanlooches/rocketfetch/commit/f209b7d1bb7b8393d15f8f1098d09fca7e87dce0)) 663 | - Fix Side-Table and remove bottom padding option ([`ead9609`](https://github.com/devanlooches/rocketfetch/commit/ead9609a8a3641fc96cd1e49e35a1e788a6d4dfd)) 664 | - Fix Side-Table and remove bottom padding option ([`64b055b`](https://github.com/devanlooches/rocketfetch/commit/64b055b63e3d57b6cdd3c51a6aa1f657534a798f)) 665 | - Fix Side-Table and remove bottom padding option ([`7057c41`](https://github.com/devanlooches/rocketfetch/commit/7057c41ff3ccea8444f4714c6241f1807e3cbe37)) 666 |
667 | 668 | --------------------------------------------------------------------------------