native-theme-gtk 0.1.1

Resolve the active GTK 4 theme into a serializable toolkit-neutral snapshot
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Command-line GTK theme probe.

fn main() {
    match native_theme_gtk::probe() {
        Ok(snapshot) => match serde_json::to_string_pretty(&snapshot) {
            Ok(json) => println!("{json}"),
            Err(error) => {
                eprintln!("failed to serialize GTK theme snapshot: {error}");
                std::process::exit(1);
            }
        },
        Err(error) => {
            eprintln!("{error}");
            std::process::exit(1);
        }
    }
}