angelofallars/treefetch

A comfy and fast system fetch tool made in Rust

here (basically AUR for Debian-based distros)

🌲 treefetch

. Tested to be much faster than neofetch and pfetch.

A great pair for cbonsai, to help you get upvotes on your *nix rice.

Installation

OpenSUSE Tumbleweed

zypper in treefetch

Arch Linux

yay -S treefetch-bin

paru -S treefetch-bin

Debian/Ubuntu

pacstall -I treefetch-bin

Install Pacstall here (basically AUR for Debian-based distros)

Binary

Download the latest binary release from the releases section.

Compiling

Compiling is currently the only option to run treefetch for BSD/macOS systems.

To compile and install treefetch manually, you first need to install the Rust compiler.

  • cargo install --git https://github.com/angelofallars/treefetch

Usage

Usage:
  treefetch [options]

OPTIONS
  -b, --bonsai   Show a bonsai tree
  -x, --xmas     Show a Christmas tree
  -h, --help     Display this help message

Contributing

Just make sure to develop and make pull requests on the dev branch instead of the main branch.

Contribute to treefetch and get your awesome profile picture displayed here!

Made with contrib.rocks.

Supporting this project

This project is free and open-source and will always be that way.

If you like this project, please consider donating to help me improve this project even further.

License

This program is licensed under the GPLv3 License.

Issues

Collection of the latest Issues

DrunkenAlcoholic

DrunkenAlcoholic

Comment Icon0

First I would like to say treefetch is an excellent fetch program, but it has an issue with the displayed memory usage and total memory.

I did a little research on htop to see how they are calculating it. I have actually done this my self in the Pascal language by using the /proc/meminfo, assuming you are familiar with the /proc/meminfo fields.

Total physical memory = MemTotal
Memory Used = (MemTotal + Shmem) - MemFree - Buffers - Cached - SReclaimable

these as you know are in kb, its just a matter of

  • Total phsical memory / (1024 * 1024)
  • Memory Used / (1024 * 1024)

or instead of using (1024*1024) just divide by the sum which is 1048576, this will yeild GB format as you already know.

Anyway I just thought to show you the calculation used by htop and btop ect... to get used memory, as your current implementation is is not adding up to the more common program memory usage programs out there.

angelofallars

angelofallars

enhancement
Comment Icon3

( Help wanted )

treefetch in its current state only supports Linux. Use Rust conditional compilation in the fields.rs file to write separate code for each OS; Windows and macOS. You may also modify the main.rs a bit if needed.

The fetch information you need to implement for either Windows or macOS are:

  • username / hostname
  • OS name
  • kernel (if applicable)
  • Shell name
  • Uptime
  • Memory usage

You can make a PR implementing only Windows or only macOS support for now if you want.

I suggest doing something like this:

DisheartenedEthereal

DisheartenedEthereal

Comment Icon2

Hello, here's a suggestion

Implement a caching system that caches the more "stable*" values in a file under /tmp, this method reduces file IO from 4-5 to 1, it could improve performance and make room for future expansion

~If you want, i also can implement this feature.~

Here's an example:

And also an argument to delete it:

treefetch -R :

Removes the temp file Treefetch

Versions

Find the latest versions by id

v2.0.0 - Jan 15, 2022

🌳 treefetch - v2.0.0

A new year comes, and a new release as well! This time, we've added a new tree - a bonsai tree! Bonsai

  • feat: add a bonsai mode, callable with -b --bonsai.
  • feat: add a help message displayed with -h or --help.
  • BREAKING CHANGE: Remove the -xmas argument for displaying the Christmas tree. You must now use either -x or --xmas with a double hyphen. This is to make the argument consistent with conventions in CLI programs.
  • refactor: Our @EdenQwQ refactored the treefetch code to improve correctness with the help of rust-analyzer.

v1.2.1 - Dec 14, 2021

This treefetch binary is compiled with Musl instead of the system glibc, aiming to fix compatibility issues with Ubuntu. This should work for both Ubuntu-based and Arch-based systems.

v1.2.0 - Dec 14, 2021

🎄🎁 treefetch v1.2.0

Another version, another new feature!

  • feat: Add a Christmas mode. Celebrate the spirit of holiday with this fetch!
    • Call it with treefetch -xmas and enjoy a Christmas tree in your terminal.
treefetch xmas

Changes

  • fix: fix potential crashing if the distro name was multiple words (e.g. Arch Linux or Linux Mint)
  • feat: remove dependency on system commands like cat and echo. treefetch no longer calls any outside commands. Now every piece of information is read through Rust's native filesystem and environment variable modules.

v1.1.0 - Dec 13, 2021

Changelog

  • Fix: Solve potential crashing bug if the distro name was multiple words (e.g. Arch Linux or Linux Mint)
  • Feat: Add decoration around the fetch
    • Fields are now prefixed with a square
    • A separator has been added between the hostname/username and the fields
145780672-6ce4a94c-4c55-4011-8610-25ca00f6cb98.png

v1.0.0 - Dec 13, 2021

🌳 The first release of treefetch, a Rust-based fetch tool. Only tested on Linux.

Download by clicking treefetch below.

Information - Updated Sep 18, 2022

Stars: 126
Forks: 6
Issues: 3

rhex ASCII terminal game coded in Rust

Learn how to code your own terminal based game in Rust

rhex ASCII terminal game coded in Rust

A dead simple ANSI terminal color painting library for Rust

See the ansi_term, term_painter, to name a few), begging the question: why yet another? Here

A dead simple ANSI terminal color painting library for Rust
CLI

1.6K

From source (recommended)

A small command-line application to view images from the terminal written in Rust

From source (recommended)

ranger-like terminal file manager written in Rust

wiki/Configuration for details

ranger-like terminal file manager written in Rust

A 'Space Invader' clone made with rust and made for the terminal

Inspired by Apache License (Version 2

A 'Space Invader' clone made with rust and made for the terminal

NETEASE CLOUD MUSIC TUI

A netease cloud music client for the terminal written in Rust

NETEASE CLOUD MUSIC TUI

send emails right from the terminal using rust!

README Generator by Dhravya Shah

send emails right from the terminal using rust!

A command-line tool that helps you track your job applications

This program is also available in Python, located on the ANSI Terminal and Rust installation in order to compile The Struggle

A command-line tool that helps you track your job applications

An easy library to make terminal applications and games in rust

The aim of this project is to make easier the game development in terminals

An easy library to make terminal applications and games in rust

Terminal text colour library for Rust

Navigate to your project's Cargo

Terminal text colour library for Rust

Password Vault 🔐 built with Rust that runs in the terminal

API consists of CRUD operations on password:

Password Vault 🔐 built with Rust that runs in the terminal
Facebook Instagram Twitter GitHub Dribbble
Privacy