pino_xrdb

Crates.iopino_xrdb
lib.rspino_xrdb
version0.1.0
sourcesrc
created_at2022-11-19 18:38:34.843065
updated_at2022-11-19 18:38:34.843065
descriptionSimple xrdb query library
homepage
repositoryhttps://github.com/MrPicklePinosaur/pino_xutils.git
max_upload_size
id718645
size8,166
Daniel Liu (MrPicklePinosaur)

documentation

README

pino_xrdb

simple zero-dependency rust parser for xrdb

crates.io docs.rs MIT/Apache 2.0

Requires xrdb to be installed on the system as this library directly calls xrdb and parses it.

It is very simple to query the xrdb of the system.

use pino_xrdb::Xrdb;
fn main() {

    let mut xrdb = Xrdb::new();
    xrdb.read().unwrap();
    
    if let Some(value) = xrdb.query("dwm", "color1") {
        println!("dwm.color1 has value {}", value);
    } else {
        println!("dwm.color1 not found");
    }
    
}
Commit count: 10

cargo fmt