2025-05-24 16:15:39 +02:00
|
|
|
#+TITLE: pumo-system-info
|
|
|
|
|
|
|
|
A Rust-based utility for gathering and presenting system information
|
|
|
|
in JSON format.
|
|
|
|
|
|
|
|
* Overview
|
|
|
|
|
|
|
|
=pumo-system-info= is designed to retrieve detailed information about
|
|
|
|
connected Bluetooth devices and present it in a structured JSON
|
|
|
|
format. This utility can be integrated with other tools or scripts for
|
|
|
|
system monitoring and management. In particular, this tool is meant to
|
|
|
|
be used with my [[https://elkowar.github.io/eww/][eww]] configuration.
|
|
|
|
|
|
|
|
* Prerequisites
|
|
|
|
- DBus
|
|
|
|
- BlueZ (for retrieving Bluetooth-related information)
|
|
|
|
- UPower (for retrieving power information)
|
|
|
|
- Rust (specified in =rustup-toolchain.toml=)
|
|
|
|
- Nix package manager with flakes (optional, for building and managing
|
|
|
|
dependencies)
|
|
|
|
|
2025-06-03 22:14:57 +02:00
|
|
|
* Build and Run =pumo-system-info=
|
2025-05-24 16:15:39 +02:00
|
|
|
1. Clone the repository
|
|
|
|
|
|
|
|
#+begin_src sh
|
|
|
|
git clone https://labs.phundrak.com/phundrak/pumo-system-info.git
|
|
|
|
cd pumo-system-info
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
2. Build the project
|
|
|
|
1. With Nix
|
|
|
|
#+begin_src sh
|
|
|
|
nix build
|
|
|
|
./result/bin/pumo-system-info
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
2. Without Nix
|
|
|
|
|
|
|
|
#+begin_src sh
|
|
|
|
cargo build --release
|
|
|
|
./target/release/pumo-system-info
|
|
|
|
#+end_src
|
|
|
|
|
2025-06-03 22:14:57 +02:00
|
|
|
* Installation
|
|
|
|
** With Cargo
|
|
|
|
You can install =pumo-system-info= using the following command:
|
|
|
|
#+begin_src sh
|
|
|
|
cargo install --path .
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Flake Input
|
|
|
|
You can add this repository in your flake inputs like so:
|
|
|
|
#+begin_src nix
|
|
|
|
inputs.pumo-system-info.url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
You can also make it follow your =nixpkgs= version with this:
|
|
|
|
#+begin_src nix
|
|
|
|
pumo-system-info = {
|
|
|
|
url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
You can now install =inputs.pumo-system-info.packages.${system}.default=
|
|
|
|
as a package. =${system}= can be either =x86_64-linux= or =aarch64-linux=.
|
|
|
|
|
2025-05-24 16:15:39 +02:00
|
|
|
* Performance
|
|
|
|
Since this is a utility for bringing information to eww, this project
|
|
|
|
needs to run fast. Fortunately, it does! Here are some benchmarks I
|
|
|
|
ran on the computers I can run it on. The results are obtained through
|
|
|
|
[[https://github.com/sharkdp/hyperfine][hyperfine]].
|
|
|
|
|
|
|
|
#+begin_src sh
|
|
|
|
cargo build --release
|
|
|
|
hyperfine --warmup 3 -N ./target/release/pumo-system-info
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
| CPU | Mean | Min | Max |
|
|
|
|
|----------------------------+---------------+-------+--------|
|
|
|
|
| Intel(R) Core(TM) i5-2540M | 6.5ms ± 1.9ms | 4.7ms | 15.2ms |
|
|
|
|
| AMD Ryzen 7 5700G | 3.1ms ± 0.2ms | 2.7ms | 4.4ms |
|
|
|
|
| AMD Ryzen 7 9800X3D | 1.1ms ± 0.1ms | 1.0ms | 1.5ms |
|
|
|
|
|
|
|
|
* Contributing
|
|
|
|
|
|
|
|
Contributions are welcome! Please fork the repository and submit a
|
|
|
|
pull request with your changes. Ensure that your commits follow the
|
|
|
|
recommendations of [[https://www.conventionalcommits.org/][Conventional Commits]].
|
|
|
|
|
|
|
|
* License
|
|
|
|
This project is licensed under the GPL-3 license. See the [[file:./LICENSE.md][LICENSE]] file
|
|
|
|
for more details.
|