mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
config: remove support for loading configuration from footrc
This commit is contained in:
parent
e7c56b0b29
commit
7b16802972
3 changed files with 4 additions and 26 deletions
|
|
@ -98,6 +98,10 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
|
|||
|
||||
### Deprecated
|
||||
### Removed
|
||||
|
||||
* Support for loading configuration from `$XDG_CONFIG_HOME/footrc`.
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
* Error when re-assigning a default key binding
|
||||
|
|
|
|||
24
config.c
24
config.c
|
|
@ -272,7 +272,6 @@ static struct config_file
|
|||
open_config(struct config *conf)
|
||||
{
|
||||
struct config_file ret = {.path = NULL, .fd = -1};
|
||||
bool log_deprecation = false;
|
||||
|
||||
path_components_t components = tll_init();
|
||||
|
||||
|
|
@ -311,12 +310,6 @@ open_config(struct config *conf)
|
|||
}
|
||||
}
|
||||
|
||||
/* Next try footrc */
|
||||
if (tll_length(components) > 0 && try_open_file(&components, "footrc")) {
|
||||
log_deprecation = true;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Finally, try foot/foot.ini in all XDG_CONFIG_DIRS */
|
||||
const char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS");
|
||||
xdg_config_dirs_copy = xdg_config_dirs != NULL
|
||||
|
|
@ -357,23 +350,6 @@ out:
|
|||
done:
|
||||
assert(tll_length(components) > 0);
|
||||
ret = path_components_to_config_file(&components);
|
||||
|
||||
if (log_deprecation && ret.path != NULL) {
|
||||
LOG_WARN("deprecated: configuration in $XDG_CONFIG_HOME/footrc, "
|
||||
"use $XDG_CONFIG_HOME/foot/foot.ini instead");
|
||||
|
||||
char *text = xstrdup(
|
||||
"configuration in \033[31m$XDG_CONFIG_HOME/footrc\033[39m or "
|
||||
"\033[31m~/.config/footrc\033[39m, "
|
||||
"use \033[32m$XDG_CONFIG_HOME/foot/foot.ini\033[39m or "
|
||||
"\033[32m~/.config/foot/foot.ini\033[39m instead");
|
||||
|
||||
struct user_notification deprecation = {
|
||||
.kind = USER_NOTIFICATION_DEPRECATED,
|
||||
.text = text,
|
||||
};
|
||||
tll_push_back(conf->notifications, deprecation);
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ in this order:
|
|||
|
||||
- *XDG_CONFIG_HOME/foot/foot.ini*
|
||||
- *~/.config/foot/foot.ini*
|
||||
- *XDG_CONFIG_HOME/footrc*
|
||||
- *~/.config/footrc*
|
||||
- *XDG_CONFIG_DIRS/foot/foot.ini*
|
||||
|
||||
# SECTION: default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue