Skip to content

Commit

Permalink
Try $XCURSOR_THEME before Xcursor.theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangeCaps committed Aug 15, 2024
1 parent b2de23f commit 070e2bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions x11rb/src/cursor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ impl<C: Connection> Cookie<'_, '_, C> {
} else {
RenderSupport::None
};
let theme = resource_database
.get_string("Xcursor.theme", "")
.map(|theme| theme.to_string())
.or_else(|| std::env::var("XCURSOR_THEME").ok());
let theme = std::env::var("XCURSOR_THEME").ok().or_else(|| {
resource_database
.get_string("Xcursor.theme", "")
.map(|theme| theme.to_string())
});
let cursor_size = match resource_database.get_value("Xcursor.size", "") {
Ok(Some(value)) => value,
_ => 0,
Expand Down

0 comments on commit 070e2bb

Please sign in to comment.