diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2020-07-16 12:06:49 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-07-23 09:39:53 +0300 |
commit | 17ad0df14ad3414de3d69e75f448a1f4acb637c3 (patch) | |
tree | 8e305d5003d94dde1f3e6c24d80f38e6fa776e8f /src/compose/table.c | |
parent | 2a8343057211686d70c46d6efe2f60a9c0e30403 (diff) | |
download | xorg-lib-libxkbcommon-17ad0df14ad3414de3d69e75f448a1f4acb637c3.tar.gz |
compose: add xdg base directory support
Before reading ~/.XCompose, try to read $XDG_CONFIG_HOME/XCompose
(falling back to ~/.config/XCompose).
This helps unclutter the home directory of users who want that.
Diffstat (limited to 'src/compose/table.c')
-rw-r--r-- | src/compose/table.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compose/table.c b/src/compose/table.c index bdfb907..1843c46 100644 --- a/src/compose/table.c +++ b/src/compose/table.c @@ -183,6 +183,15 @@ xkb_compose_table_new_from_locale(struct xkb_context *ctx, goto found_path; } + cpath = path = get_xdg_xcompose_file_path(); + if (path) { + file = fopen(path, "rb"); + if (file) + goto found_path; + } + free(path); + path = NULL; + cpath = path = get_home_xcompose_file_path(); if (path) { file = fopen(path, "rb"); |