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
dnkl commented 2 years ago
Owner

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 for foot/foot.ini before trying footrc).

If no configuration file can be found in $XDG_CONFIG_HOME/~/.config, then for each directory in XDG_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

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 for `foot/foot.ini` before trying `footrc`). If no configuration file can be found in `$XDG_CONFIG_HOME`/`~/.config`, then for each directory in `XDG_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
craigbarnes reviewed 2 years ago
README.md Outdated
[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
Collaborator

;9~

>;9~
dnkl commented 2 years ago
Poster
Owner

Ooops :)

Ooops :)
dnkl marked this conversation as resolved
craigbarnes reviewed 2 years ago
foot will search for a configuration file in the following locations,
in this order:
- _XDG_CONFIG_HOME/foot/foot.ini_
Collaborator

Not specific to this PR, but I think these should be bold rather than underlined.

From man 1 man:

The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections.

bold text          type exactly as shown.
italic text        replace with appropriate argument.

Note: "italic" == "underline", in this context.

Not specific to this PR, but I think these should be bold rather than underlined. From `man 1 man`: ```none The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections. bold text type exactly as shown. italic text replace with appropriate argument. ``` *Note*: "italic" == "underline", in this context.
dnkl commented 2 years ago
Poster
Owner

You're right. Bold is used for these everywhere else, so I've updated these to be bold too.

You're right. Bold is used for these everywhere else, so I've updated these to be bold too.
dnkl marked this conversation as resolved
craigbarnes reviewed 2 years ago
free(default_path);
free(conf_file.path);
if (conf_file.fd < 0)
close(conf_file.fd);
Collaborator

This doesn't seem quite right. Why close() only invalid FDs?

This doesn't seem quite right. Why `close()` only invalid FDs?
dnkl commented 2 years ago
Poster
Owner

This doesn’t seem quite right

Completely wrong, I'd say :) Should be fixed now.

> This doesn’t seem quite right Completely wrong, I'd say :) Should be fixed now.
dnkl marked this conversation as resolved
Collaborator

I've looked over this and done a build/install. LGTM, except a few small nits.

I've looked over this and done a build/install. LGTM, except a few small nits.
Poster
Owner

@craigbarnes thank you!

@craigbarnes thank you!
dnkl merged commit 52af2694ff into master manually 2 years ago
The pull request has been manually merged as 52af2694ff.
Sign in to join this conversation.
Loading…
There is no content yet.