|0.1.1||Jan 16, 2022|
|0.1.0||Jan 15, 2022|
#1609 in Command line utilities
Another command-line system information tool, but written in Rust!
- Unique variables
- Customizing the border
Things planned for the future
- Ansi image
- Real image support (Kitty,ueberzug)
- Sixel support
- Custom user scripts
- Common Environment variables
- Terminal colors
- Themes - gtk, Qt
- Documentation on docs.rs
- Better markdown
- Instructions for config
- Logo design
- Config examples, screenshots
cargo install rufet
or manually clone the repo and build
Configuration is done via a toml file located at
Everything is separated into modules, such as
[data.hostname], and each of these modules has variables that dictate how the module will be displayed. Some of the modules have unique variables. Those variables will be mentioned below.
[data] format="$hostname$os" height=10 margin=2 padding=5 [data.hostname] format="this is my hostname: $value" [logo] format="logo" [[logo.rule]] id="logo" exec='echo -ne "$(<$HOME/.config/rufet/ansi)" \\n'
Changes the text that the module will display. Each module will replace
$value with the value of what the module fetches. So hostname will replace
$value with the hostname of the user.
[data.hostname] format="This is my hostname: $value"
Changes the minimum number of lines the module takes up. Useful if you want to have some space between the module and it's border, or if you want to make the data modules be the same height as the logo. [data] height=25
Adds blanks characters to the left and right of the module but within the border, useful if you want some space between the module and the border to the sides. [data.kernel] padding=25
Adds blanks characters to the left and right of the module but outside the border, useful if you want some space between 2 modules separated by borders [data] margin=2
Changes the way the text inside a module is aligned [data] alignment= "left"|"center"|"right"
the data module, which holds all the modules has inbuilt ids for each of the module
but it also has
$all which will display all of the available modules that have not yet been used. So if you want to always display your memory usage first, you'd do
Uptime has a variable
time_format which formats the time it displays.
time_format="Uptime is: $d days, $h hours, $m minutes, $s seconds"
Customizing the border
The border is a structure inside each module. It has it's own variables which can be customized like so:
[data.hostname.border] top: ['╭', '─', '╮'], bottom: ['╰', '─', '╯'], sides: ['│', '│'], visible: true, color: "#ff00ff", background: "255;0;0",
If you want to have a custom module that displays text, or executes a script, you do so via
rules, a rule is a a structure which has an
id , which, when found in other modules will be replaced with a value.
Rules can be used to make custom modules or to change the color and appearance of existing modules.
Variables for a rule:
id: "id to replace" text: "text" exec: "shell command" color: "#fff"|"0;0;0" background: "#fff"|"0;0;0" effects: ["bold","faint","italic","underline","blink","reverse","conceal","crossed"] border: Border padding: int margin: int alignment: String
text variable isn't set, it will replace
id with itself, while giving it the color. Useful if you want to change the color of a predefined id, like
text variable has priority over
Change the value of the
background variables, they support hex code colors such as
#ff00ff , and rgb seperated by a
; , such as
[data.hostname] format="this is my red hostname: $value , $blue" [[data.hostname.rule]] id="$value" color="#ff0000" [[data.hostname.rule]] id="$blue" text="this is blue text with a green background" color="#0000ff" background="#00ff00"
Custom modules are still rules, but instead of using the
text variable to choose the
id, you use the
exec variable to execute a shell command that prints to the standard output.
[data] format="$custom1" [[data.rule]] id="$custom1" exec="echo -n aaa" padding=5 [data.rule.border] color="#f00" visible=true
Due to the way toml is made, it doesn't support the
\e escape code used for ANSI art, or any other escape code used for it, the only way to get ANSI art inside a toml is with the
\u001B escape code, for that you'd have to use an image to ANSI converter and then replace all of the escape codes with
\u001B , instead of that, it's recommended to use a rule which then uses a command to print the contents of the file, such as
echo, or any script of your choice. That will make it easier and also make the config file less clustered.
[logo] format="logo" [[logo.rule]] id="logo" exec='echo -ne "$(<$HOME/.config/rufet/ansi)" \\n'