allow setting the default cursor theme/size

This commit is contained in:
Leonardo Hernández Hernández 2024-06-20 19:35:50 -06:00
parent 650a918010
commit 0f6f7ea46f
No known key found for this signature in database
GPG key ID: E538897EE11B9624
2 changed files with 8 additions and 2 deletions

8
dwl.c
View file

@ -2509,8 +2509,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);
setenv("XCURSOR_SIZE", "24", 1);
cursor_mgr = wlr_xcursor_manager_create(cursor_theme, atoi(cursor_size));
setenv("XCURSOR_SIZE", cursor_size, 1);
if (cursor_theme)
setenv("XCURSOR_THEME", cursor_theme, 1);
else
unsetenv("XCURSOR_THEME");
/*
* wlr_cursor *only* displays an image on screen. It does not move around