diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-04-06 16:44:09 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-04-07 11:06:01 +0000 |
| commit | 20608c987b1668cb2b4e3cff7615577cd05c2075 (patch) | |
| tree | 85ed96cc6fb17c321b67aa7a16aa04cf986b1c82 /config.c | |
| parent | config: add tweak option to allow disabling sixels (diff) | |
config: fallback to /etc/xdg if XDG_CONFIG_DIRS is unset
Closes #1008
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -444,10 +444,12 @@ open_config(void) } } - /* Finally, try foot/foot.ini in all XDG_CONFIG_DIRS */ + /* Finally, try foot/foot.ini in all XDG_CONFIG_DIRS, or /etc/xdg + * if unset */ const char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS"); xdg_config_dirs_copy = xdg_config_dirs != NULL - ? strdup(xdg_config_dirs) : NULL; + ? strdup(xdg_config_dirs) + : strdup("/etc/xdg"); if (xdg_config_dirs_copy != NULL) { for (char *save = NULL, |
