feat(cli): add detailed version info w/ shadow

This commit is contained in:
LGUG2Z
2024-07-05 08:00:33 -07:00
parent 60bc96e9a5
commit 2a67c9c786
8 changed files with 256 additions and 116 deletions

View File

@@ -48,6 +48,10 @@ windows-implement = { workspace = true }
windows-interface = { workspace = true }
winput = "0.2"
winreg = "0.52"
shadow-rs = { workspace = true }
[build-dependencies]
shadow-rs = { workspace = true }
[features]
deadlock_detection = ["parking_lot/deadlock_detection"]

3
komorebi/build.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
shadow_rs::new().unwrap();
}

View File

@@ -45,6 +45,8 @@ use komorebi::HOME_DIR;
use komorebi::INITIAL_CONFIGURATION_LOADED;
use komorebi::SESSION_ID;
shadow_rs::shadow!(build);
fn setup() -> Result<(WorkerGuard, WorkerGuard)> {
if std::env::var("RUST_LIB_BACKTRACE").is_err() {
std::env::set_var("RUST_LIB_BACKTRACE", "1");
@@ -132,7 +134,7 @@ fn detect_deadlocks() {
}
#[derive(Parser)]
#[clap(author, about, version)]
#[clap(author, about, version = build::CLAP_LONG_VERSION)]
struct Opts {
/// Allow the use of komorebi's custom focus-follows-mouse implementation
#[clap(short, long = "ffm")]