1 unstable release
0.1.0 | Nov 19, 2022 |
---|
#16 in #zero-dependency
9KB
83 lines
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");
}
}
lib.rs
:
Rust wrapper for xrdb
. Query the system's xrdb or add new values to it. Can handle wildcards
resources.
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");
}
}