gobidev / pfetch-rs Goto Github PK
View Code? Open in Web Editor NEWA rewrite of the pfetch system information tool in Rust
Home Page: https://crates.io/crates/pfetch
License: MIT License
A rewrite of the pfetch system information tool in Rust
Home Page: https://crates.io/crates/pfetch
License: MIT License
I test both pfetch-bash and pfetch-rs, the former takes 1.01s and the latter is 1.00s
it looks like getting the count of apk is very slow
Alpine Linux 3.19.1 x86-64
pfetch-rs only shows how many flatpaks I have installed rather than how many packages I have installed from different package managers
running the pfetch-rs on bedrock linux shows only the stratum (the distribution running on top of bedrock) it's running from.
looking at the source code i see no mention of bedrock, bedrock needs to be handled specially since it isn't a distro but meta distro allowing to run other distros on top of it.
the original pfetch does detect bedrock by checking if PATH env contains "/bedrock/cross/", i guess just checking if that something like "/bedrock/etc/os-release" exists would also be sufficient, nevermind that would still show bedrock even with strat -r option (hiding the bedrock from enviroment)
with RUST_BACKTRACE=full
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." })', src\main.rs:207:38
stack backtrace:
0: 0x7ff6a60ecde2 - <unknown>
1: 0x7ff6a610597b - <unknown>
2: 0x7ff6a60e993a - <unknown>
3: 0x7ff6a60ecb2b - <unknown>
4: 0x7ff6a60ef2b9 - <unknown>
5: 0x7ff6a60eef3b - <unknown>
6: 0x7ff6a60efb50 - <unknown>
7: 0x7ff6a60ef8de - <unknown>
8: 0x7ff6a60ed7ff - <unknown>
9: 0x7ff6a60ef590 - <unknown>
10: 0x7ff6a6112845 - <unknown>
11: 0x7ff6a6112d66 - <unknown>
12: 0x7ff6a604433e - <unknown>
13: 0x7ff6a6045826 - <unknown>
14: 0x7ff6a604837c - <unknown>
15: 0x7ff6a60e5ffe - <unknown>
16: 0x7ff6a6044d9c - <unknown>
17: 0x7ff6a610d1d0 - <unknown>
18: 0x7ff8c64f7604 - BaseThreadInitThunk
19: 0x7ff8c71826a1 - RtlUserThreadStart
on macos, only homebrew packages are counted, not macports packages
Consider adding your package to Nix, since it can be installed on any distro and used within home dir.
https://github.com/dtolnay/rust-toolchain looks like a viable alternative
pfetch-rs is higher than pfetch or htop shows
Line 187 in 23d1719
It's probably due to a different calculation method:
Follow-up to #35, the original pfetch handled unknown MacOS versions a bit better, an unhandled version would just not display a codename instead of leaving the codename as Unknown
, so a MacOS 15 would display as MacOS 15.0
instead of MacOS 15.0 Unknown
, pfetch-rs should do the same thing
In the first line of the benchmark table, the mean is larger than the min and the max, and the max is smaller than the min.
https://github.com/Gobidev/pfetch-rs/blame/main/README.md#L62
It seems a lot of the logos have fallen out of date... Since the original pfetch is now dead along with neofetch, I think it's time to make one last pull.
In particular, I've noticed the Fedora logo is different between latest pfetch and pfetch-rs.
pfetch-rs v2.9.1
Bazzite is a custom image based on Fedora Silverblue and Universal Blue made to be a replacement for SteamOS on the Steam Deck.
The logo would want to look something the logos in the directory in the ublue-os/bazzite repo
logo.txt
is the neofetch ascii artlogo.svg
is what you want the logo to look likeIf you have the nix package manager installed and are on a distro other than nix, disabling them being counted will result in a much faster execution time with only a slight inaccuracy of the package count.
running pfetch on my M1 Mac
uname -mrv
22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 arm64
results in the following output:
___ USER@HOSTNAME
(.. | host arm64
(<> | kernel 22.3.0
/ __ \ uptime 3d 18h 55m
( / \ /| pkgs 0
_/\ __)/_) memory 15441M / 32768M
\/-____\/
when i manually set PF_ASCII
to "macos" it gives the correct ascii logo for MacOS
also pkgs
should probably track brew by default.
Would be nice to have an ASCII logo on my Steam Deck besides the tux
For screenshot see #4
Hello. Thank you for your project. I have a request. Could you include in your project support for Oracle Linux?
Here is the link for official website.
Thank you.
How do you add custom ASCII art when you install pfetch-rs
via Homebrew
? I want to use another fedora logo from ufetch
. I've checked in the cellar from brew to see if there are any files that contain ASCII art but there is none. There is not even a single file from this git repository in the Brew Cellar. I might not know how Homebrew works properly? @Gobidev
This will act as a little log/discussion for now for the attempts made to make this package part of Homebrew's core package.
Currently the repository needs to be 30 or more days before it is added to Homebrew-core, which it is yet to reach.
In the mean time if you'd like to try this package through homebrew, I have made it part of my personal tap:
brew install 21stcenturyman/homebrew-21st/pfetch-rs
or
brew tap 21stcenturyman/homebrew-21st
brew install pfetch-rs
pfetch-rs
uses libmacchina for window manager detection, which currently relies on wmctrl
being installed and the user running X11. I added detection with xprop
in Macchina-CLI/libmacchina@8f94e1f , but there was no new release since then. This also does not fix detection on Wayland
the memory usage shown in activity monitor is higher than pfetch-rs.
Im not that experienced in rust but wouldnt it be better to embed the strings in the binary with include_str!
something like this
const ARCH = include_str!(#"
/\\
/ \\
/\\ \\
/ \\
/ ,, \\
/ | | -\\
/_-'' ''-_\\"#);
const ARCO = include_str!(#"
/\\
/ \\
/ /\\ \\
/ / \\ \\
/ / \\ \\
/ / _____\\ \\
/_/ \`----.\\_\\"#);
match distro {
"arch" => ARCH,
"arco" => ARCO
};
(I wrote this in github's editor ignore any mistakes in the code)
CI build for NetBSD failed for the latest release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.