New default configuration location: XDG_CONFIG_HOME/foot/foot.ini #114
Manually merged
dnkl
merged 10 commits from config-file-location
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'config-file-location'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This moves the default location of the configuration file from
$XDG_CONFIG_HOME/footrc
to$XDG_CONFIG_HOME/foot/foot.ini
.If
XDG_CONFIG_HOME
has not been set, we look in~/.config
instead (still searching forfoot/foot.ini
before tryingfootrc
).If no configuration file can be found in
$XDG_CONFIG_HOME
/~/.config
, then for each directory inXDG_CONFIG_DIRS
, look for<dir>/foot/foot.ini
.If we end up using the old location,
footrc
, we display a deprecation warning to the user.I think all references to the old location has been updated...
Closes #110.
@kazufukurou, @Ordoviz, @sterni
[here](https://codeberg.org/dnkl/foot/src/branch/master/footrc).
`$XDG_CONFIG_HOME/foot/foot.ini` (defaulting to
`~/.config/foot/foot.ini`). A template for that can usually be found
in `/usr/share/foot/foot.ini;9~` or
Ooops :)
foot will search for a configuration file in the following locations,
in this order:
- _XDG_CONFIG_HOME/foot/foot.ini_
Not specific to this PR, but I think these should be bold rather than underlined.
From
man 1 man
:Note: "italic" == "underline", in this context.
You're right. Bold is used for these everywhere else, so I've updated these to be bold too.
free(default_path);
free(conf_file.path);
if (conf_file.fd < 0)
close(conf_file.fd);
This doesn't seem quite right. Why
close()
only invalid FDs?Completely wrong, I'd say :) Should be fixed now.
I've looked over this and done a build/install. LGTM, except a few small nits.
@craigbarnes thank you!
52af2694ff
into master manually 2 years ago52af2694ff
.