From 4e0a7171ec4e7c1e2484a6e02bdcf68d22719342 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 11:33:02 -0700 Subject: [PATCH] refactor(cli): name the komorebi and komorebi-bar commands explicitly clap derives the command name from CARGO_PKG_NAME. The packages are about to be renamed (komorebi-windows, komorebi-linux, komorebi-macos, komorebi-bar-macos) while the binaries keep their names, so the name is written in #[clap(name = ...)] on the three daemons and the two bars. komorebic already names itself in komorebic-core. Not behaviour: the names are the ones the packages give now. Verified: KDE tests/version.rs is the test that reads the name (run in the next revisions); fast-check below. Not verified: macOS and Windows runs. --- komorebi-bar/src/main.rs | 2 +- komorebi-for-kde/komorebi/src/main.rs | 2 +- komorebi-for-mac/komorebi-bar/src/main.rs | 2 +- komorebi-for-mac/komorebi/src/main.rs | 2 +- komorebi/src/main.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/komorebi-bar/src/main.rs b/komorebi-bar/src/main.rs index b76e22a3..30e24225 100644 --- a/komorebi-bar/src/main.rs +++ b/komorebi-bar/src/main.rs @@ -40,7 +40,7 @@ use windows_core::BOOL; pub use komorebi_bar_core::statics::*; #[derive(Parser)] -#[clap(author, about, version)] +#[clap(name = "komorebi-bar", author, about, version)] struct Opts { /// Print the JSON schema of the configuration file and exit #[clap(long)] diff --git a/komorebi-for-kde/komorebi/src/main.rs b/komorebi-for-kde/komorebi/src/main.rs index 95db7759..d20b4692 100644 --- a/komorebi-for-kde/komorebi/src/main.rs +++ b/komorebi-for-kde/komorebi/src/main.rs @@ -218,7 +218,7 @@ impl From for PlanMode { /// A tiling window manager for KDE Plasma. #[derive(Parser)] -#[clap(author, about, version = version::LONG_VERSION)] +#[clap(name = "komorebi", author, about, version = version::LONG_VERSION)] struct Opts { /// Level of log output verbosity #[clap(long, value_enum, default_value_t=LogLevel::Info)] diff --git a/komorebi-for-mac/komorebi-bar/src/main.rs b/komorebi-for-mac/komorebi-bar/src/main.rs index 57e31bea..f3a41542 100644 --- a/komorebi-for-mac/komorebi-bar/src/main.rs +++ b/komorebi-for-mac/komorebi-bar/src/main.rs @@ -38,7 +38,7 @@ use tracing_subscriber::EnvFilter; pub use komorebi_bar_core::statics::*; #[derive(Parser)] -#[clap(author, about, version)] +#[clap(name = "komorebi-bar", author, about, version)] struct Opts { /// Print the JSON schema of the configuration file and exit #[clap(long)] diff --git a/komorebi-for-mac/komorebi/src/main.rs b/komorebi-for-mac/komorebi/src/main.rs index 85137d52..5b5ad65c 100644 --- a/komorebi-for-mac/komorebi/src/main.rs +++ b/komorebi-for-mac/komorebi/src/main.rs @@ -186,7 +186,7 @@ enum LogLevel { } #[derive(Parser)] -#[clap(author, about, version = version::LONG_VERSION)] +#[clap(name = "komorebi", author, about, version = version::LONG_VERSION)] struct Opts { /// Path to a static configuration JSON file #[clap(short, long)] diff --git a/komorebi/src/main.rs b/komorebi/src/main.rs index 9b4f12d3..76d858ce 100644 --- a/komorebi/src/main.rs +++ b/komorebi/src/main.rs @@ -172,7 +172,7 @@ enum LogLevel { } #[derive(Parser)] -#[clap(author, about, version = komorebi::build::CLAP_LONG_VERSION)] +#[clap(name = "komorebi", author, about, version = komorebi::build::CLAP_LONG_VERSION)] struct Opts { /// Allow the use of komorebi's custom focus-follows-mouse implementation #[clap(short, long = "ffm")]