mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 10:14:14 +00:00
allow specify cursor theme and size
Co-authored-by: Leonardo Hernández Hernández <leohdz172@protonmail.com>
This commit is contained in:
parent
83dccced8e
commit
93ff8ec760
@ -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};
|
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 */
|
/* 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 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 */
|
/* tagging */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
|
|||||||
7
dwl.c
7
dwl.c
@ -2692,7 +2692,12 @@ setup(void)
|
|||||||
* Xcursor themes to source cursor images from and makes sure that cursor
|
* Xcursor themes to source cursor images from and makes sure that cursor
|
||||||
* images are available at all scale factors on the screen (necessary for
|
* images are available at all scale factors on the screen (necessary for
|
||||||
* HiDPI support). Scaled cursors will be loaded with each output. */
|
* 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
|
* wlr_cursor *only* displays an image on screen. It does not move around
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user