Skip to content

A WIP command line system information tool written with multithreading in rust for performance with toml file configuration.

License

Notifications You must be signed in to change notification settings

devanlooches/rocketfetch

Repository files navigation

Rocketfetch

A *WIP* (Contributions are greatly appreciated) command line system information tool written in Rust for performance with TOML file configuration.

Crates.io version Crates.io version Libraries.io dependency status for latest release

Table of Contents

Inspiration

Rocketfetch was inspired by neofetch. I wanted to add some performance to neofetch while also improving the configuration. I modeled my configuration after that of Starship.

Installation

  • Using Cargo:
cargo install rocketfetch

If this fails to install, please make sure you have the most recent Rust version installed.

  • Using Homebrew For MacOSX:
brew install devanlooches/rocketfetch/rocketfetch

Command Line

rocketfetch 0.6.9
A WIP command line system information tool (neofetch) rewritten in rust for performance with toml file configuration.

USAGE:
    rocketfetch [FLAGS] [OPTIONS]

FLAGS:
    -h, --help            Prints help information
        --no-line-wrap    Disables Line Wrapping
    -V, --version         Prints version information

OPTIONS:
    -c, --config <FILE>    Sets custom configuration file.
    -m, --mode <mode>      Set the printing mode. Can be one of `side-block`, `bottom-block`, or `classic`

Configuration

You can configure rocketfetch either through the default path of ~/.config/rocketfetch or pass a path in cli by specifying the -c option.

Top Level

Value Default Description
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!
offset 4 Specify the number of spaces between the logo and the information.
wrap-lines true Wether or not to wrap the output lines.
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.)

Format Header

Value Default Description
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).
top-left-corner-char "╭" Set the character to use as the top left corner of the block (Only works in and bottom-block modes).
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).
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).
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).
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).
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).
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).
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).
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).

User Header

Value Default Description
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
pre-text "" Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the text
separator-style "white" A format string with each word separated by dots that describes the style of the between username and hostname
separator-char "@" A character that separates between the username and hostname

Delimiter Header

Value Default Description
style "white" A format string with each word separated by dots that describes the style of the delimiter
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
char "-" The character to use as the delimiter

OS Header

Value Default Description
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
pre-text "OS: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the text

Host Header

Value Default Description
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
pre-text "Host: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Kernel Header

Value Default Description
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
pre-text "Kernel: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Uptime Header

Value Default Description
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
pre-text "Uptime: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text
time-format "$days days, $hours hours, $minutes minutes" A String that describes the format of the time. Variables are: $years, $days, $hours, $minutes, $seconds.

Packages Header

Value Default Description
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
pre-text "Packages: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Shell Header

Value Default Description
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
pre-text "Shell: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Resolution Header

Value Default Description
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
pre-text "Resolution: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Desktop Environment Header

Value Default Description
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
pre-text "Desktop Environment: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Window Manager Header

Value Default Description
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
pre-text "Window Manager: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Terminal Header

Value Default Description
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
pre-text "Terminal: " Text that comes before this module
output-style "white" A format string with each word separated by dots that describes the style of the output text

Custom Header

Value Description
pre-text-style A format string with each word separated by dots that describes the style of the text that before this module
pre-text Text that comes before this module
output-style A format string with each word separated by dots that describes the style of the output text
command The command to run to get the output of the module

Default Configuration

A default Configuration will look like so:

module-order = "user delimiter os host kernel uptime packages shell resolution desktop-environment window-manager terminal cpu"
offset = 4
logo-cmd = "auto"
wrap-lines = true

[format]
mode = "classic"
top-left-corner-char = ""
top-right-corner-char = ""
bottom-left-corner-char = ""
bottom-right-corner-char = ""
horizontal-char = ""
vertical-char = ""
padding-left = 1
padding-right = 1
padding-top = 0

[user]
pre-text-style = "bold.yellow"
pre-text = ""
output-style = "bold.yellow"
separator-style = "white"
separator-char = "@"

[delimiter]
style = "white"
repeat-num = 0
char = "-"

[os]
pre-text-style = "bold.yellow"
pre-text = "OS: "
output-style = "white"

[host]
pre-text-style = "bold.yellow"
pre-text = "Host: "
output-style = "white"

[kernel]
pre-text-style = "bold.yellow"
pre-text = "Kernel: "
output-style = "white"

[uptime]
pre-text-style = "bold.yellow"
pre-text = "Uptime: "
output-style = "white"
time-format = "$days days, $hours hours, $minutes minutes"

[packages]
pre-text-style = "bold.yellow"
pre-text = "Packages: "
output-style = "white"

[shell]
pre-text-style = "bold.yellow"
pre-text = "Shell: "
output-style = "white"

[resolution]
pre-text-style = "bold.yellow"
pre-text = "Resolution: "
output-style = "white"

[desktop-environment]
pre-text-style = "bold.yellow"
pre-text = "Desktop Environment: "
output-style = "white"

[window-manager]
pre-text-style = "bold.yellow"
pre-text = "Window Manager: "
output-style = "white"

[terminal]
pre-text-style = "bold.yellow"
pre-text = "Terminal: "
output-style = "white"

[cpu]
pre-text-style = "bold.yellow"
pre-text = "CPU: "
output-style = "white"

Todo

  • Add more Modules (For starters: the ones that neofetch supports)
    • Os
    • Host
    • Kernel
    • Uptime
    • Shell
    • Resolution
    • Desktop Environment
    • Window Manager
    • Terminal
    • CPU
    • Window Manager Theme
    • GPU
    • Memory
    • GPU Driver
    • CPU Usage
    • Disk
    • Battery
    • Current Playing Song
    • Music Player
    • Local IP
    • Users
    • Locale
    • Colors

About

A WIP command line system information tool written with multithreading in rust for performance with toml file configuration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages