Skip to content

Commit

Permalink
Get theme from $XCURSOR_THEME before trying Xcursor.theme
Browse files Browse the repository at this point in the history
Fallback to $XCURSOR_THEME when database doesn't have a cursor theme

Revert splitting on ' '

Try $XCURSOR_THEME before Xcursor.theme
  • Loading branch information
ChangeCaps committed Aug 19, 2024
1 parent 5558a7f commit 3bb2990
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions x11rb/src/cursor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ impl<C: Connection> Cookie<'_, '_, C> {
} else {
RenderSupport::None
};
let theme = resource_database
.get_string("Xcursor.theme", "")
.map(|theme| theme.to_string());
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 3bb2990

Please sign in to comment.