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//! - [`input`] — Keyboard and pointing-device detection.
23//! - [`disk`] — Physical disk model, size, and type detection.
24//! - [`media`] — Active media player and currently playing track detection.
25//! - [`memory`] — Physical memory (RAM) slot detection.
26//! - [`motherboard`] — Motherboard / system model detection.
27//! - [`network`] — Network interface detection, IP resolution, and Wi-Fi.
28//! - [`packages`] — Installed package count detection.
29//! - [`shell`] — Shell detection and version querying.
30//! - [`terminal`] — Terminal emulator detection and font configuration reading.
31//! - [`theme`] — UI theme, icon, cursor, and font detection.
32//! - [`weather`] — Weather information via wttr.in.
33//! - [`wm`] — Window manager detection.
34//! - [`fetch`] — Full system information gathering (`SystemInfo`, `CollectOptions`).
35
36pub mod audio;
37pub mod battery;
38pub mod bios;
39pub mod bluetooth;
40pub mod btrfs;
41pub mod camera;
42pub mod disk;
43pub mod display;
44pub mod fetch;
45pub mod gamepad;
46pub mod gpu;
47pub mod input;
48pub mod media;
49pub mod memory;
50pub mod motherboard;
51pub mod network;
52pub mod packages;
53pub mod shell;
54pub mod terminal;
55pub mod theme;
56pub mod weather;
57pub mod wm;
58pub mod zfs;
59
60#[cfg(target_os = "windows")]
61pub(crate) mod win_reg;
62#[cfg(target_os = "windows")]
63pub(crate) mod win_setupapi;
64#[cfg(target_os = "windows")]
65pub(crate) mod win_users;
66
67#[cfg(target_os = "macos")]
68pub(crate) mod macos_ffi;
69
70pub use fetch::{CollectOptions, SystemInfo};