#system #cli #fetch #asynchronous #asynch

app rocketfetch

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

22 releases (5 breaking)

Uses new Rust 2021

new 0.6.1 Nov 27, 2021
0.5.10 Nov 21, 2021
0.5.3 Jul 30, 2021

#54 in Command line utilities

Download history 18/week @ 2021-08-10 19/week @ 2021-08-17 2/week @ 2021-08-24 13/week @ 2021-09-07 23/week @ 2021-09-14 20/week @ 2021-09-21 52/week @ 2021-09-28 6/week @ 2021-10-05 42/week @ 2021-10-12 15/week @ 2021-10-26 4/week @ 2021-11-02 23/week @ 2021-11-09 30/week @ 2021-11-16 56/week @ 2021-11-23

113 downloads per month

MIT license

39KB
1K SLoC

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

cargo install rocketfetch

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

Command Line

rocketfetch 0.5.3
A WIP command line system information tool (neofetch) rewritten in Rust for performance with TOML file configuration.

USAGE:
    rocketfetch [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config <FILE>    Sets custom configuration file.
        --mode <mode>      Set the printing mode. Can be one of `side-table`, `bottom-table`, 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.
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"
offset = 4
logo_cmd = "auto"

[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"

Todo

  • Add more Modules (For starters: the ones that neofetch supports)

Dependencies

~4–37MB
~611K SLoC