Module x11rb::resource_manager[][src]

X11 resource manager library.

Usage example (please cache the database in real applications instead of re-opening it whenever a value is needed):

use x11rb::{connection::Connection, errors::ReplyError, resource_manager::Database};
fn get_xft_dpi(conn: &impl Connection) -> Result<Option<u32>, ReplyError> {
    let db = Database::new_from_default(conn)?;
    let value = db.get_value("Xft.dpi", "");
    Ok(value.ok().flatten())
}

This functionality is similar to what is available to C code through xcb-util-xrm and Xlib’s Xrm* function family. Not all their functionality is available in this library. Please open a feature request if you need something that is not available.

The code in this module is only available when the resource_manager feature of the library is enabled.

Structs

Database

A X11 resource database.