Expand description
X11 resource manager library.
Usage example (please cache the database returned by new_from_default in real applications
instead of re-opening it whenever a value is needed):
use x11rb::{connection::Connection, errors::ReplyError, resource_manager::new_from_default};
fn get_xft_dpi(conn: &impl Connection) -> Result<Option<u32>, ReplyError> {
let db = 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.
Functions§
- new_
from_ default - Create a new X11 resource database from the default locations.
- new_
from_ resource_ manager - Create a new X11 resource database from the
RESOURCE_MANAGERproperty of the first screen’s root window.