Skip to content

add optional config path arg#11

Merged
doums merged 1 commit intodoums:masterfrom
haennes:config-path-arg
Apr 19, 2026
Merged

add optional config path arg#11
doums merged 1 commit intodoums:masterfrom
haennes:config-path-arg

Conversation

@haennes
Copy link
Copy Markdown
Contributor

@haennes haennes commented Apr 19, 2026

No description provided.

@doums
Copy link
Copy Markdown
Owner

doums commented Apr 19, 2026

Hi, thx for this PR.
By curiosity, can you explain your use case and which custom path do you need? (Asking to see if the cli UX need more improvement other than just adding this flag).

Please, update the README to reflect the changes:

By default, bato looks for the config file `~/.config/bato/bato.toml`
(XDG_CONFIG_HOME).\
To use a custom file, run with `--config` flag.\
If the config file is not found, bato prints an error and exits.

@haennes
Copy link
Copy Markdown
Contributor Author

haennes commented Apr 19, 2026

I am using NixOS and would like the configuration to reside inside the /nix/store instead of just a config directory.
For most other programs this is "traditionally" solved by creating a symlink from ~/.config/bato/bato.toml to the store but i think just passing a path directly is more clean

Thanks for the quick reply :)

Comment thread src/cli.rs Outdated
pub log_level: Option<LogLevel>,

/// Set config file path
#[arg(short = 'c', long)]
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this

    /// Use a custom config file
    #[arg(short = 'c', long, value_name = "FILE")]

Copy link
Copy Markdown
Owner

@doums doums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see the above requests)

@haennes
Copy link
Copy Markdown
Contributor Author

haennes commented Apr 19, 2026

(see the above requests)

Amended them

Copy link
Copy Markdown
Owner

@doums doums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clean, thx!

@doums doums merged commit f8e4ad3 into doums:master Apr 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants