Go to file
Adrian Groh d04c5c3617
Some checks failed
CI / ${{ matrix.name }} (${{ matrix.target }}) (false, Linux x86_64, ubuntu-latest, true, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / ${{ matrix.name }} (${{ matrix.target }}) (true, Linux armv7, ubuntu-latest, true, armv7-unknown-linux-gnueabihf) (push) Has been cancelled
CI / ${{ matrix.name }} (${{ matrix.target }}) (true, NetBSD, ubuntu-latest, true, x86_64-unknown-netbsd) (push) Has been cancelled
Release / Generate Changelog (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/aarch64-apple-darwin/release/pfetch, false, macOS aarch64, macos-latest, pfetch-macos-aarch64.tar.gz, true, aarch64-apple-darwin) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/aarch64-linux-android/release/pfetch, true, Android, ubuntu-latest, pfetch-android-aarch64.tar.gz, true, aarch64-linux-android) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/aarch64-unknown-linux-musl/release/pfetch, true, Linux musl aarch64, ubuntu-latest, pfetch-linux-musl-aarch64.tar.gz, true, aarch64-unknown-linux-musl) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/armv7-unknown-linux-gnueabihf/release/pfetch, true, Linux ARMv7, ubuntu-latest, pfetch-linux-gnueabihf-armv7.tar.gz, true, armv7-unknown-linux-gnueabihf) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-apple-darwin/release/pfetch, false, macOS x86_64, macos-latest, pfetch-macos-x86_64.tar.gz, true, x86_64-apple-darwin) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-pc-windows-gnu/release/pfetch.exe, false, Windows x86_64, windows-latest, pfetch-windows-x86_64.exe, true, x86_64-pc-windows-gnu) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-unknown-freebsd/release/pfetch, true, freeBSD x86_64, ubuntu-latest, pfetch-freebsd-x86_64.tar.gz, true, x86_64-unknown-freebsd) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-unknown-linux-gnu/release/pfetch, false, Linux GNU x86_64, ubuntu-latest, pfetch-linux-gnu-x86_64.tar.gz, true, x86_64-unknown-linux-gnu) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-unknown-linux-musl/release/pfetch, true, Linux musl x86_64, ubuntu-latest, pfetch-linux-musl-x86_64.tar.gz, true, x86_64-unknown-linux-musl) (push) Has been cancelled
Release / ${{ matrix.name }} (${{ matrix.target }}) (target/x86_64-unknown-netbsd/release/pfetch, true, NetBSD x86_64, ubuntu-latest, pfetch-netbsd-x86_64.tar.gz, true, x86_64-unknown-netbsd) (push) Has been cancelled
chore(release): prepare for pfetch-rs v2.2.0
2023-03-09 15:32:30 +01:00
.github ci(release): add Windows x86_64 release binary 2023-03-09 15:29:30 +01:00
pfetch-extractor chore(release): prepare for pfetch-rs v2.2.0 2023-03-09 15:32:30 +01:00
src perf: prefer libmacchina readouts over dotenvy 2023-03-09 14:21:39 +01:00
.gitignore Initial commit 2023-02-16 16:16:19 +01:00
Cargo.lock chore(release): prepare for pfetch-rs v2.2.0 2023-03-09 15:32:30 +01:00
Cargo.toml chore(release): prepare for pfetch-rs v2.2.0 2023-03-09 15:32:30 +01:00
CHANGELOG.md chore(release): prepare for pfetch-rs v2.2.0 2023-03-09 15:32:30 +01:00
cliff.toml chore: add git-cliff configuration 2023-02-17 14:09:02 +01:00
LICENSE Initial commit 2023-02-16 16:16:19 +01:00
print_all.sh feat: add Nobara Project logo 2023-03-09 14:28:25 +01:00
README.md feat: add Nobara Project logo 2023-03-09 14:28:25 +01:00

pfetch-rs

A rewrite of the pfetch system information tool by dylanaraps in Rust


About

If you are familiar with the pfetch system information tool by dylanaraps, this does the exact same thing, but with an about 10x faster runtime. pfetch is simple by design with some (but not many) configuration options and a minimalistic look.

Supported Platforms: Linux, Android, macOS, Windows, FreeBSD, NetBSD

Included Logos: Alpine Linux, Android, AmogOS (new) Arch Linux, ArcoLinux, Artix Linux, Bedrock Linux, Buildroot, CelOS, CentOS, Crystal Linux, dahliaOS, Debian, Devuan, DietPi (new), DragonflyBSD, Elementary OS, EndeavourOS, Fedora, Fiwix (new), FreeBSD, Garuda Linux, Gentoo Linux, Gnu, Guix, Haiku, HydroOS, Hyperbola, instantOS, IRIX, KDE neon, Linux Lite, Linux, Mint, macOS, Mageia, Manjaro, Minix, MorphOS (new), MX Linux, NetBSD, NixOS, Nobara Project (new), OpenBSD, openSUSE Tumbleweed, openSUSE Leap, OpenWrt, Parabola, Pop!_OS (updated), PureOS, Raspbian, SerenityOS, Slackware, Solus, Solaris, Ubuntu, Void Linux, Windows (new), Xeonix Linux

For all other distributions, a penguin will be displayed.

Credit to the original pfetch and its contributors.

If you want to add a logo, feel free to make a Pull Request.

Status

This project is still in early development, expect things to not work properly. Please open issues for bugs you are encountering.

Installation

Binary

Download a binary from the latest release.

Cargo

cargo install pfetch

AUR

Install the pfetch-rs or pfetch-rs-bin AUR package.

Performance

Benchmarks performed on an AMD Ryzen 5 3600. Execution time is measured using hyperfine with -w 4 -m 500 -N flags

Implementation Mean [ms] Min [ms] Max [ms]
POSIX sh (bash) 27.3 ± 0.9 25.3 23.2
POSIX sh (dash) 19.3 ± 0.6 18.3 24.0
Rust 2.1 ± 0.2 1.8 3.6

Note: This is with pacman being the only installed package manager. Especially having nix installed will have a big impact on performance, as querying installed nix packages is very costly. If you want to skip slow package managers from being counted, you can set the PF_FAST_PKG_COUNT environment variable.

Configuration

Like the original pfetch, pfetch-rs is configured through environment variables. Your existing config will probably still work, the only difference is how padding is configured.

If you want to display a custom logo, you will have to download the source code, make your changes to ./pfetch-extractor/logos.sh and build the binary with cargo b --release.

# Which information to display.
# Default: first example below
# Valid: space separated string
#
# OFF by default: shell editor wm de palette
PF_INFO="ascii title os host kernel uptime pkgs memory"

# Example: Only ASCII.
PF_INFO="ascii"

# Example: Only Information.
PF_INFO="title os host kernel uptime pkgs memory"

# A file containing environment variables to source before running pfetch.
# Default: unset
# Valid: A shell script
PF_SOURCE=""

# Separator between info name and info data.
# Default: unset
# Valid: string
PF_SEP=":"

# Enable/Disable colors in output:
# Default: 1
# Valid: 1 (enabled), 0 (disabled)
PF_COLOR=1

# Color of info names:
# Default: unset (auto)
# Valid: 0-9
PF_COL1=4

# Color of info data:
# Default: unset (auto)
# Valid: 0-9
PF_COL2=9

# Color of title data:
# Default: unset (auto)
# Valid: 0-9
PF_COL3=1

# Alignment paddings (this is different to the original version).
# Default: unset (auto)
# Valid: int
PF_PAD1=""
PF_PAD2=""
PF_PAD3=""

# Which ascii art to use.
# Default: unset (auto)
# Valid: string
PF_ASCII="openbsd"

# The below environment variables control more
# than just 'pfetch' and can be passed using
# 'HOSTNAME=cool_pc pfetch' to restrict their
# usage solely to 'pfetch'.

# Which user to display.
USER=""

# Which hostname to display.
HOSTNAME=""

# Skip package managers that take "long" to query package count (like nix)
PF_FAST_PKG_COUNT=1