diff --git a/flake.nix b/flake.nix index 2f621e73..9fdf000b 100644 --- a/flake.nix +++ b/flake.nix @@ -42,17 +42,7 @@ // { inherit version; pname = "komorebi"; - cargoExtraArgs = "-p komorebi"; - src = ./.; - } - ); - - komorebic = craneLib.buildPackage ( - commonArgs - // { - inherit version; - pname = "komorebic"; - cargoExtraArgs = "-p komorebic"; + cargoExtraArgs = "-p komorebi -p komorebic"; src = ./.; } ); @@ -62,9 +52,9 @@ }; packages = flake-utils.lib.flattenTree rec { - inherit komorebi komorebic; + inherit komorebi; default = komorebi; }; } ); -} \ No newline at end of file +} diff --git a/justfile b/justfile index 5b342e9c..610d38aa 100644 --- a/justfile +++ b/justfile @@ -6,6 +6,7 @@ fmt: test -z "$(rg 'println!' --type rust ./komorebi)" || (echo "println! macro not allowed"; false) cargo +nightly fmt cargo +stable clippy + alejandra . prettier --write README.md fix: diff --git a/komorebi/src/lib.rs b/komorebi/src/lib.rs index 34b2a33c..63e1673c 100644 --- a/komorebi/src/lib.rs +++ b/komorebi/src/lib.rs @@ -195,7 +195,7 @@ pub enum LibraryError { pub fn hidden_frame_bottom_left(screen_frame: CGRect, window_size: CGSize) -> CGRect { let visible_sliver: f64 = 1.0; let origin_x = screen_frame.origin.x - (window_size.width - visible_sliver); - let origin_y = screen_frame.origin.y - (window_size.height - visible_sliver); + let origin_y = screen_frame.origin.y + screen_frame.size.height - visible_sliver; CGRect::new(CGPoint::new(origin_x, origin_y), window_size) } diff --git a/shell.nix b/shell.nix index 1389867d..7d2091ea 100644 --- a/shell.nix +++ b/shell.nix @@ -11,5 +11,6 @@ with pkgs; jq prettier cargo-udeps + alejandra ]; }