diff --git a/config.def.h b/config.def.h index fbd59dc..568d946 100644 --- a/config.def.h +++ b/config.def.h @@ -14,6 +14,8 @@ static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0}; static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0}; /* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 0.0}; +static const char *cursortheme = NULL; /* theme from /usr/share/cursors/xorg-x11 or ${XCURSOR_PATH} */ +static const char cursorsize[] = "24"; /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; diff --git a/dwl.c b/dwl.c index 7e8f523..80e4d11 100644 --- a/dwl.c +++ b/dwl.c @@ -2692,7 +2692,12 @@ setup(void) * Xcursor themes to source cursor images from and makes sure that cursor * images are available at all scale factors on the screen (necessary for * HiDPI support). Scaled cursors will be loaded with each output. */ - cursor_mgr = wlr_xcursor_manager_create(NULL, 24); + cursor_mgr = wlr_xcursor_manager_create(cursortheme, atoi(cursorsize)); + setenv("XCURSOR_SIZE", cursorsize, 1); + if (cursortheme) + setenv("XCURSOR_THEME", cursortheme, 1); + else + unsetenv("XCURSOR_THEME"); /* * wlr_cursor *only* displays an image on screen. It does not move around