diff options
| author | sodiboo <git@sodi.boo> | 2024-05-26 23:57:34 +0200 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-06-28 14:00:26 +0300 |
| commit | d180e60e0584e0c43682d7aca612c366f881dd85 (patch) | |
| tree | e240f28df0053bc61c090f5d76a34e164d91467f /src/cli.rs | |
| parent | 65addefd09acef059e1415e9ebdfcbb82f86d689 (diff) | |
| download | niri-d180e60e0584e0c43682d7aca612c366f881dd85.tar.gz niri-d180e60e0584e0c43682d7aca612c366f881dd85.tar.bz2 niri-d180e60e0584e0c43682d7aca612c366f881dd85.zip | |
Implement support for `$NIRI_CONFIG` environment variable
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,6 +13,9 @@ use crate::utils::version; #[command(subcommand_help_heading = "Subcommands")] pub struct Cli { /// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`). + /// + /// This can also be set with the `NIRI_CONFIG` environment variable. If both are set, the + /// command line argument takes precedence. #[arg(short, long)] pub config: Option<PathBuf>, /// Import environment globally to systemd and D-Bus, run D-Bus services. @@ -43,6 +46,9 @@ pub enum Sub { /// Validate the config file. Validate { /// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`). + /// + /// This can also be set with the `NIRI_CONFIG` environment variable. If both are set, the + /// command line argument takes precedence. #[arg(short, long)] config: Option<PathBuf>, }, |
