Skip to content

IngoPlane/fetch-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

151 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetch

forked from areofyl/fetch

A donut.c-inspired fetch tool that spins your distro logo in 3D with live-updating system info.

-- Changes in this Fork --

COLOR OVERRIDE:

use --color argument to override the entire logo with a solid color.

  • BLACK, RED, BLUE, GREEN, YELLOW, PURPLE, CYAN, WHITE

ALIGN LOGO ON EXIT:

When exiting fetch, the logo snaps back to its flat rotation for aesthetics.


Logo

demo

Takes any ASCII/Unicode distro logo, turns each character into a point cloud based on its visual density, and renders it as a rotating 3D relief with Blinn-Phong shading. System info is gathered natively — no external dependencies required. Works on Linux and macOS.

Based on gentoo.c.

Build & run

make
./fetch

Press any key to stop — the keypress passes through to the shell, so it works as a startup fetch. Ctrl-C works too.

Install

sudo make install

PREFIX=~/.local make install if you don't want it system-wide.

Package managers

Arch Linux (AUR)

You can install fetch-git from the AUR using your favorite AUR helper:

yay -S fetch-git

or

paru -S fetch-git

The fetch-git AUR package was not compromised in the AUR package hack. It is maintained and up to date.

Nix

Fetch is available in nixpkgs unstable, or as a flake.

Try out fetch!

nix-shell -p fetch

Add to your configuration.nix or home.nix.

environment.systemPackages = [
  ...
  pkgs.fetch
  ...
];

Homebrew (macOS)

brew tap areofyl/fetch
brew install fetch-git

Fedora Linux

You can install fetch from COPR:

sudo dnf copr enable realorangekun/fetch
sudo dnf install fetch

Or build an RPM package locally:

sudo dnf install @development-tools
rpmbuild -ba fetch.spec
sudo dnf install ~/rpmbuild/RPMS/*/fetch-*.rpm

openSUSE

You can install fetch from the Open Build Service:

sudo zypper addrepo https://download.opensuse.org/repositories/home:RealOrangeKun/openSUSE_Tumbleweed/home:RealOrangeKun.repo
sudo zypper refresh
sudo zypper install fetch

Or build an RPM package locally:

sudo zypper install -t pattern devel_basis
rpmbuild -ba fetch.spec
sudo zypper install ~/rpmbuild/RPMS/*/fetch-*.rpm

Ubuntu / Debian

You can install fetch from the PPA:

sudo add-apt-repository ppa:realorangekun/fetch
sudo apt update
sudo apt install fetch

Or build a .deb package locally:

sudo apt install build-essential devscripts debhelper
dpkg-buildpackage -us -uc -b
sudo apt install ../fetch_*.deb

Gentoo Linux (GURU)

You can install fetch from the GURU repository using:

eselect repository enable guru
emaint sync -r guru
emerge -a app-misc/fetch

As for all GURU packages, you will have to add the package in your package.accept\_keywords directory if ~arch is not already set.

Logos

By default it auto-detects your distro and grabs the logo from fastfetch (if installed) with its original per-character colors preserved. Works with any of fastfetch's 500+ distro logos!

You can also specify one directly:

./fetch -l arch
./fetch -l NixOS
./fetch -l asahi

Or drop a custom logo in ~/.config/fetch/logo.txt:

# distro: gentoo
         -/oyddmdhs+:.
     -odNMMMMMMMMNNmhy+-`
...

Without fastfetch, the built-in Gentoo logo is used.

System info

All system info is gathered natively — no fastfetch or neofetch needed:

  • OS - /etc/os-release
  • Host - /proc/device-tree/model or /sys/class/dmi/id/product_name
  • Kernel - uname()
  • Uptime - /proc/uptime
  • Packages - emerge, pacman, dpkg, rpm, xbps, apk
  • Shell - parent process detection (not just $SHELL)
  • Display - per-connector DRM enumeration (multi-monitor)
  • WM - process scanning + DE-to-WM mapping
  • Theme/Icons/Font - ~/.config/gtk-3.0/settings.ini (Linux), defaults read (macOS)
  • CPU - /proc/cpuinfo, device-tree (Apple Silicon), or sysctl (macOS)
  • GPU - DRM + lspci for full names (Linux), system_profiler (macOS)
  • Memory/Swap - /proc/meminfo (Linux), vm_stat (macOS)
  • Disk - statvfs() + /proc/mounts (Linux), getmntinfo (macOS)
  • Battery - energy_now/energy_full (Linux), IOKit (macOS)
  • Packages - emerge, pacman, dpkg, rpm/dnf, xbps, apk, flatpak, brew
  • Local IP - getifaddrs()

Stats like memory, battery, and uptime update in real-time while the logo spins.

Config

Create ~/.config/fetch/config to customize:

# fields — list to show, in this order
# remove or comment out to hide
os
host
kernel
uptime
packages
shell
display
wm
theme
icons
font
terminal
cpu
gpu
memory
swap
disk
ip
battery
locale
colors

# appearance
# label_color=magenta   (red, green, yellow, blue, magenta, cyan, white)
# separator=─           (character for the title separator)
# shading=.,-~:;=!*#$@  (characters for 3D shading, supports UTF-8)

# logo colors (override distro defaults)
# logo_outer=magenta    (outer/heavy character color)
# logo_inner=white      (inner/light character color)

# 3d
# light=top-left        (top-left, top-right, top, left, right, front, bottom-left, bottom-right)
# spin=xy               (x, y, or xy)
# speed=1.0             (rotation speed)
# size=1.0              (logo scale, e.g. 2.0 for double size)
# depth=1.0             (3D extrusion depth, e.g. 3.0 for chunkier look)
# height=36             (override render height in rows)

Options

Flag Description
-l, --logo <name> Use a logo from fastfetch by name
--rotate-x Lock rotation to X axis only
--rotate-y Lock rotation to Y axis only
-s, --speed <float> Speed multiplier (default 1.0)
--size <float> Scale the logo (e.g. 2.0 for double size)
--depth <float> Scale the 3D depth (default 1.0)
--height <n> Override render height in rows
--no-info Just the logo, no system info
--no-color Disable coloring
--color Set Color: BLACK, RED, BLUE, GREEN, YELLOW, PURPLE, CYAN, WHITE
--frames <n> Stop after n frames
--infinite Run forever
--shading-chars <str> Custom shading ramp, supports UTF-8
-h, --help Show help

CLI flags override config file settings.

Contributing

This is a fork from areofyl/fetch for my own edits and amusement. If you're interested in the original project, please find them over at https://github.com/areofyl/fetch

How it works

Each character in the logo gets a weight based on its visual density (M is heavy, . is light, is full, is thin), and that weight becomes a height, turning the flat logo into a 3D relief. Surface normals come from the height gradient, and everything gets rotated + projected + shaded every frame with a z-buffer. Single file C, no deps beyond libm.

About

An animated 3D fetch tool for your terminal. Takes your distro's ASCII logo, turns it into a spinning 3D object, and displays system info alongside it.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages