Lucien Cartier-Tilet f9fe233b6c
All checks were successful
CI / tests (push) Successful in 5m42s
chore: add CI
2025-06-03 22:55:11 +02:00
2025-06-03 22:55:11 +02:00
2025-05-24 16:57:46 +02:00
2025-05-24 16:45:20 +02:00
2025-05-24 16:52:43 +02:00
2025-05-24 16:57:46 +02:00
2025-05-24 17:01:56 +02:00
2025-06-03 22:15:51 +02:00

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 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)

Build and Run pumo-system-info

  1. Clone the repository

    git clone https://labs.phundrak.com/phundrak/pumo-system-info.git
    cd pumo-system-info
  2. Build the project

    1. With Nix

      nix build
      ./result/bin/pumo-system-info
    2. Without Nix

      cargo build --release
      ./target/release/pumo-system-info

Installation

With Cargo

You can install pumo-system-info using the following command:

cargo install --path .

Flake Input

You can add this repository in your flake inputs like so:

inputs.pumo-system-info.url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";

You can also make it follow your nixpkgs version with this:

pumo-system-info = {
  url = "git+https://labs.phundrak.com/phundrak/pumo-system-info";
  inputs.nixpkgs.follows = "nixpkgs";
};

You can now install inputs.pumo-system-info.packages.${system}.default as a package. ${system} can be either x86_64-linux or aarch64-linux.

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 hyperfine.

cargo build --release
hyperfine --warmup 3 -N ./target/release/pumo-system-info
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 Conventional Commits.

License

This project is licensed under the GPL-3 license. See the LICENSE file for more details.

Description
A Rust-based utility for gathering and presenting system information in JSON format.
Readme 73 KiB
Languages
Rust 87.9%
Nix 12.1%