feat: add cursor_size and cursor_theme option in config

This commit is contained in:
DreamMaoMao 2025-05-05 17:45:25 +08:00
parent bf6e39ad4f
commit 614a28abd1
4 changed files with 24 additions and 7 deletions

View file

@ -5588,13 +5588,12 @@ void handle_foreign_destroy(struct wl_listener *listener, void *data) {
void setup(void) {
// signal(SIGSEGV, signalhandler);
parse_config();
init_baked_points();
setenv("XCURSOR_SIZE", "24", 1);
setenv("XDG_CURRENT_DESKTOP", "maomao", 1);
parse_config();
init_baked_points();
int drm_fd, i, sig[] = {SIGCHLD, SIGINT, SIGTERM, SIGPIPE};
struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = handlesig};
sigemptyset(&sa.sa_mask);
@ -5750,8 +5749,7 @@ void setup(void) {
* 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(cursor_theme, 24);
cursor_mgr = wlr_xcursor_manager_create(NULL, 24);
setenv("XCURSOR_SIZE", "24", 1);
cursor_mgr = wlr_xcursor_manager_create(config.cursor_theme, cursor_size);
/*
* wlr_cursor *only* displays an image on screen. It does not move around