Skip to main content

retch_sysinfo/
lib.rs

1// SPDX-FileCopyrightText: 2026 Ken Tobias
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4//! # retch-sysinfo
5//!
6//! System information gathering library for retch.
7//!
8//! Provides cross-platform hardware and OS detection, GPU identification,
9//! battery status, and environment probing. Extracted from the `retch-cli`
10//! binary to allow reuse as a standalone library.
11//!
12//! ## Modules
13//!
14//! - [`audio`] — Audio server and device detection.
15//! - [`battery`] — Cross-platform battery status detection.
16//! - [`bios`] — BIOS / firmware version detection.
17//! - [`bluetooth`] — Bluetooth controller state and connected device detection.
18//! - [`camera`] — Camera and webcam detection.
19//! - [`display`] — Display detection and EDID parsing.
20//! - [`gamepad`] — Gamepad and joystick controller detection.
21//! - [`gpu`] — GPU detection and PCI ID lookup.
22//! - [`disk`] — Physical disk model, size, and type detection.
23//! - [`memory`] — Physical memory (RAM) slot detection.
24//! - [`motherboard`] — Motherboard / system model detection.
25//! - [`network`] — Network interface detection, IP resolution, and Wi-Fi.
26//! - [`packages`] — Installed package count detection.
27//! - [`shell`] — Shell detection and version querying.
28//! - [`terminal`] — Terminal emulator detection and font configuration reading.
29//! - [`theme`] — UI theme, icon, cursor, and font detection.
30//! - [`weather`] — Weather information via wttr.in.
31//! - [`fetch`] — Full system information gathering (`SystemInfo`, `CollectOptions`).
32
33pub mod audio;
34pub mod battery;
35pub mod bios;
36pub mod bluetooth;
37pub mod camera;
38pub mod disk;
39pub mod display;
40pub mod fetch;
41pub mod gamepad;
42pub mod gpu;
43pub mod memory;
44pub mod motherboard;
45pub mod network;
46pub mod packages;
47pub mod shell;
48pub mod terminal;
49pub mod theme;
50pub mod weather;
51
52#[cfg(target_os = "windows")]
53pub(crate) mod win_reg;
54
55#[cfg(target_os = "macos")]
56pub(crate) mod macos_ffi;
57
58pub use fetch::{CollectOptions, SystemInfo};