nixinfo
A lib crate for gathering system info such as cpu, distro, environment, kernel, etc in Rust.
To use: nixinfo = "0.2.8"
in your Cargo.toml
.
Currently supported
- CPU model and temperature (Celsius)
nixinfo::cpu()
->Result
nixinfo::temp()
->Result
- Device name
nixinfo::device()
->Result
- Distro name
nixinfo::distro()
->Result
- Environment (e.g. DE or WM)
nixinfo::environment()
->Result
- env variables
nixinfo::env("VARIABLE")
->Option
- GPU info (requires
lspci
andgrep
to be installed for now until I find a pure rust solution)nixinfo::gpu()
->Result
- Hostname
nixinfo::hostname()
->Result
- Kernel
nixinfo::kernel()
->Result
- Total memory in MBs
nixinfo::memory()
->Result
- Music info (only mpd is supported, requires
music
feature to be enabled)nixinfo::music()
->String
- Package counts (managers supported are apk, apt, dnf, dpkg, eopkg, pacman, pip, portage, rpm, and xbps)
nixinfo::packages("manager")
->Result
- Terminal being used (unless tmux is used, in which case N/A will be outputted because reasons)
nixnfo::terminal()
->Result
- Uptime of device
nixinfo::uptime()
->Result
TODO
- Obtain used memory in addition to total memory
- Support *BSD