-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the rustfetch wiki!
This wiki documents the usage, configuration, and customization of rustfetch, a minimal yet highly customizable system information fetcher written in Rust.
rustfetch is distributed as source code to be compiled locally. This ensures it is optimized specifically for your machine's CPU.
-
rustc(The Rust Compiler) git
- Clone the repository:
git clone https://github.com/akirathelinuxguy/rustfetch.git
cd rustfetch
- Compile with optimization flags:
rustc -C opt-level=3 -C target-cpu=native -C lto=fat rustfetch.rs
Note: opt-level=3 and lto=fat ensure the binary is as small and fast as possible.
- (Optional) Install to your path:
sudo mv rustfetch /usr/local/bin/
Uninstalling rustfetch is straightforward since it's a single binary with minimal system integration.
Step 1: Locate the rustfetch binary
First, find where rustfetch is installed:
which rustfetch
This will return the full path, such as:
/usr/local/bin/rustfetch/usr/bin/rustfetch/home/youruser/.local/bin/rustfetch
Step 2: Remove the binary
Based on the location from Step 1, use the appropriate command:
If installed in /usr/local/bin/:
sudo rm /usr/local/bin/rustfetch
If installed in /usr/bin/:
sudo rm /usr/bin/rustfetch
If installed in ~/.local/bin/:
rm ~/.local/bin/rustfetch
Step 3: Remove cache and log files
rustfetch creates temporary files during operation. Remove them with:
# Remove the cache file
rm -f /tmp/rustfetch_cache
Remove the log file
rm -f /tmp/rustfetch_log
Step 4: Verify complete removal
Confirm rustfetch has been fully removed:
# This should return nothing
which rustfetch
This should report "command not found"
rustfetch --version
Verify no leftover files
ls -la /tmp/rustfetch*
If the ls command shows no files, uninstallation is complete.
Step 5: Clean up source directory (optional)
If you still have the source code directory, you can remove it:
# Navigate to the parent directory where you cloned rustfetch
cd /path/to/parent/directory
Remove the rustfetch source directory
rm -rf rustfetch
Problem: "Permission denied" when trying to remove the binary
Solution: You need sudo privileges to remove files from /usr/local/bin/ or /usr/bin/:
sudo rm /usr/local/bin/rustfetch
Problem: Multiple versions of rustfetch exist
Solution: Find all instances and remove them:
# Find all rustfetch binaries
sudo find /usr -name rustfetch 2>/dev/null
find ~ -name rustfetch 2>/dev/null
Remove each one found (adjust paths as needed)
sudo rm /path/to/each/rustfetch
Problem: Binary is in use
Solution: Ensure rustfetch isn't currently running:
# Check if rustfetch is running
pgrep rustfetch
If running, kill the process(es)
pkill rustfetch
Then remove the binary
sudo rm /usr/local/bin/rustfetch
As of the latest version, you can toggle virtually every module from the command line without recompiling.
-
--help,-h: Show the help menu. -
--no-color: Disable colored output (useful for piping/logging). -
--theme <n>: Switch color themes. Available themes:-
classic(Default) pastelgruvboxnorddracula
-
-
--fast: Enable fast mode (skips CPU temp, network ping, public IP - approximately 60% faster) -
--benchmark: Show detailed performance timing for each operation -
--json: Output system information in JSON format -
--no-cache: Disable caching -
--cache-ttl <seconds>: Set cache time-to-live in seconds (default: 60) -
--network-ping: Enable network ping tests (slower, disabled by default)
Enable or disable specific info lines. Useful for creating a minimal look.
| Module | Enable Flag | Disable Flag |
|---|---|---|
| OS | --os | --no-os |
| Kernel | --kernel | --no-kernel |
| Uptime | --uptime | --no-uptime |
| Boot Time | --boot | --no-boot |
| Bootloader | --bootloader | --no-bootloader |
| Packages | --packages | --no-packages |
| Shell | --shell | --no-shell |
| WM | --wm | --no-wm |
| DE | --de | --no-de |
| Init | --init | --no-init |
| Terminal | --terminal | --no-terminal |
| CPU | --cpu | --no-cpu |
| CPU Temp | --cpu-temp | --no-cpu-temp |
| CPU Cores | --cpu-cores | --no-cpu-cores |
| CPU Freq | --cpu-freq | --no-cpu-freq |
| CPU Cache | --cpu-cache | --no-cpu-cache |
| GPU | --gpu | --no-gpu |
| GPU VRAM | --gpu-vram | --no-gpu-vram |
| Memory | --memory | --no-memory |
| Swap | --swap | --no-swap |
| Disk/Partitions | --disk, --partitions | --no-disk, --no-partitions |
| Battery | --battery | --no-battery |
| Network | --network | --no-network |
| Display | --display | --no-display |
| Resolution | --resolution | --no-resolution |
| Model | --model | --no-model |
| Motherboard | --mobo | --no-mobo |
| BIOS | --bios | --no-bios |
| Theme | --desktop-theme | --no-desktop-theme |
| Icons | --icons | --no-icons |
| Font | --font | --no-font |
| Processes | --processes | --no-processes |
| Locale | --locale | --no-locale |
| Public IP | --public-ip | --no-public-ip |
| Entropy | --entropy | --no-entropy |
| Users | --users | --no-users |
| Failed Units | --failed | --no-failed |
To show only the OS, Kernel, and Memory:
./rustfetch --no-uptime --no-shell --no-wm --no-disk --no-gpu
Fast mode (~60% faster):
rustfetch --fast
Performance benchmarking:
rustfetch --benchmark
Use gruvbox color theme:
rustfetch -t gruvbox
Enable network latency tests:
rustfetch --network-ping
For permanent changes, you should edit the rustfetch.rs file directly and recompile. The configuration constants are located at the very top of the file.
By default, rustfetch caches some static info (like OS version) to start faster.
const CACHE_ENABLED: bool = true;
const CACHE_FILE: &str = "/tmp/rustfetch_cache";
Set CACHE_ENABLED to false if you change your OS files often (unlikely) or want to debug.
rustfetch now includes comprehensive error logging to /tmp/rustfetch_log. This log provides detailed, human-readable information about:
- Program startup and shutdown
- Configuration parsing
- Data collection from all threads
- Command executions (lspci, xrandr, etc.)
- File read operations
- Network statistics
- Performance metrics
Viewing the log:
# View the entire log
cat /tmp/rustfetch_log
View last 50 lines
tail -n 50 /tmp/rustfetch_log
View only errors and warnings
grep -E "ERROR|WARNING" /tmp/rustfetch_log
The log file is automatically cleared on system reboot (it's in /tmp). To manually clear it:
> /tmp/rustfetch_log
To disable logging, edit rustfetch.rs and change:
const LOG_ENABLED: bool = true;
to:
const LOG_ENABLED: bool = false;
Then recompile.
rustfetch includes a massive library of ASCII art in the get_logo() function.
To add your own:
- Open
rustfetch.rs. - Find
fn get_logo(os: &str). - Add a new
else ifblock for your distro/OS name. - Paste your ASCII art as a string array
&[ ... ].- Tip: Use raw string literals
r#" ... "#to avoid needing to escape backslashes.
- Tip: Use raw string literals
Example:
} else if ol.contains("my-custom-os") {
&[
r#" / \ "#,
r#" ( o ) "#,
r#" \_/ "#,
]
}
Q: My font doesn't show the icons/bars correctly.
A: Ensure you are using a Nerd Font or a font that supports basic block elements (like █) for the progress bars.
Q: Why doesn't GPU detection work on my VM?
A: rustfetch relies on lspci and /sys/class/drm checks which might be virtualized or masked in some VM environments.
Q: Can I change the colors permanently?
A: Yes, modify the ColorScheme struct or the impl ColorScheme block in rustfetch.rs to define your own palette.