feat: Trying to load several config paths

- Config::load now returns Option<Self> instead of Self
- Updated README to contain new possible config paths
This commit is contained in:
Alexey 2026-04-06 11:18:50 +03:00
commit f00b850b37
3 changed files with 50 additions and 11 deletions

View file

@ -49,7 +49,13 @@ $ ./aliveline
## Configuration
Aliveline tries to find config at:
- `$XDG_CONFIG_DIR/aliveline/config.toml`
- `$ALIVELINE_CONFIG`
- `$XDG_CONFIG_HOME/aliveline/config.toml`
- `$XDG_CONFIG_HOME/.aliveline`
- `$HOME/.config/aliveline/config.toml`
- `$HOME/.config/.aliveline`
- `$HOME/.aliveline/config.toml`
- `$HOME/.aliveline`
- `./config.toml` (relative to working directory)
If config isn't found, Aliveline uses default values defined in [config.toml](https://2ndbeam.ru/git/2ndbeam/aliveline/src/branch/master/config.toml).