diff options
-rw-r--r-- | sway/sway.1.txt | 38 | ||||
-rw-r--r-- | wayland/window.c | 12 |
2 files changed, 49 insertions, 1 deletions
diff --git a/sway/sway.1.txt b/sway/sway.1.txt index f62e27f4..0e503d2e 100644 --- a/sway/sway.1.txt +++ b/sway/sway.1.txt | |||
@@ -79,6 +79,44 @@ the location of your choosing and start there. | |||
79 | 79 | ||
80 | For information on the config file format, see **sway**(5). | 80 | For information on the config file format, see **sway**(5). |
81 | 81 | ||
82 | Environment | ||
83 | ----------- | ||
84 | |||
85 | The following environment variables have an effect on sway: | ||
86 | |||
87 | *SWAY_CURSOR_THEME*:: | ||
88 | Specifies the name of the cursor theme to use. | ||
89 | |||
90 | *SWAY_CURSOR_SIZE*:: | ||
91 | Specifies the size of the cursor to use. | ||
92 | |||
93 | *SWAYSOCK*:: | ||
94 | Specifies the path to the sway IPC socket. | ||
95 | |||
96 | *WLC_DRM_DEVICE*:: | ||
97 | Specifies the device to use in DRM mode. | ||
98 | |||
99 | *WLC_SHM*:: | ||
100 | Set 1 to force EGL clients to use shared memory. | ||
101 | |||
102 | *WLC_OUTPUTS*:: | ||
103 | Number of fake outputs to use when running in X11 mode. | ||
104 | |||
105 | *WLC_XWAYLAND*:: | ||
106 | Set to 0 to disable Xwayland support. | ||
107 | |||
108 | *WLC_LIBINPUT*:: | ||
109 | Set to 1 to force libinput (even in X11 mode). | ||
110 | |||
111 | *WLC_REPEAT_DELAY*:: | ||
112 | Configures the keyboard repeat delay. | ||
113 | |||
114 | *WLC_REPEAT_RATE*:: | ||
115 | Configures the keyboard repeat rate. | ||
116 | |||
117 | *XKB_DEFAULT_LAYOUT*, *XKB_DEFAULT_VARIANT*, *XKB_DEFAULT_OPTIONS*:: | ||
118 | Configures the xkb keyboard settings. See xkeyboard-config(7). | ||
119 | |||
82 | Authors | 120 | Authors |
83 | ------- | 121 | ------- |
84 | 122 | ||
diff --git a/wayland/window.c b/wayland/window.c index 9bc0d4a2..3f48d39f 100644 --- a/wayland/window.c +++ b/wayland/window.c | |||
@@ -112,7 +112,17 @@ struct window *window_setup(struct registry *registry, uint32_t width, uint32_t | |||
112 | get_next_buffer(window); | 112 | get_next_buffer(window); |
113 | 113 | ||
114 | if (registry->pointer) { | 114 | if (registry->pointer) { |
115 | window->cursor.cursor_theme = wl_cursor_theme_load("default", 32, registry->shm); // TODO: let you customize this | 115 | char *cursor_theme = getenv("SWAY_CURSOR_THEME"); |
116 | if (!cursor_theme) { | ||
117 | cursor_theme = "default"; | ||
118 | } | ||
119 | char *cursor_size = getenv("SWAY_CURSOR_SIZE"); | ||
120 | if (!cursor_size) { | ||
121 | cursor_size = "16"; | ||
122 | } | ||
123 | |||
124 | window->cursor.cursor_theme = wl_cursor_theme_load(cursor_theme, | ||
125 | atoi(cursor_size), registry->shm); | ||
116 | window->cursor.cursor = wl_cursor_theme_get_cursor(window->cursor.cursor_theme, "left_ptr"); | 126 | window->cursor.cursor = wl_cursor_theme_get_cursor(window->cursor.cursor_theme, "left_ptr"); |
117 | window->cursor.surface = wl_compositor_create_surface(registry->compositor); | 127 | window->cursor.surface = wl_compositor_create_surface(registry->compositor); |
118 | 128 | ||