aboutsummaryrefslogtreecommitdiff
path: root/sway/config
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-01 21:05:09 +0200
committerDrew DeVault <sir@cmpwn.com>2019-06-05 11:00:10 -0400
commit190546fd315a24c04006fb1b177069933f4350da (patch)
treedb0910b4931625d259f14b22a56b54095a8466bd /sway/config
parent799f5a2cd5ffa83d73816489aa8683564bc226f7 (diff)
downloadsway-190546fd315a24c04006fb1b177069933f4350da.tar.xz
add seat sub command 'xcursor_theme'
New 'seat <name> xcursor_theme <theme> [<size>]' command that configures the default xcursor theme. The default seat's xcursor theme is also propagated to XWayland, and exported through the XCURSOR_THEME and XCURSOR_SIZE environment variables. This is done every time the default seat's configuration is changed.
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/seat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 04a44e3a..d4190cec 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -27,6 +27,8 @@ struct seat_config *new_seat_config(const char* name) {
}
seat->hide_cursor_timeout = -1;
seat->allow_constrain = CONSTRAIN_DEFAULT;
+ seat->xcursor_theme.name = NULL;
+ seat->xcursor_theme.size = 24;
return seat;
}
@@ -147,6 +149,12 @@ void merge_seat_config(struct seat_config *dest, struct seat_config *source) {
if (source->allow_constrain != CONSTRAIN_DEFAULT) {
dest->allow_constrain = source->allow_constrain;
}
+
+ if (source->xcursor_theme.name != NULL) {
+ free(dest->xcursor_theme.name);
+ dest->xcursor_theme.name = strdup(source->xcursor_theme.name);
+ dest->xcursor_theme.size = source->xcursor_theme.size;
+ }
}
struct seat_config *copy_seat_config(struct seat_config *seat) {
@@ -170,6 +178,7 @@ void free_seat_config(struct seat_config *seat) {
seat_attachment_config_free(seat->attachments->items[i]);
}
list_free(seat->attachments);
+ free(seat->xcursor_theme.name);
free(seat);
}