diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..8392d159 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.gitignore b/.gitignore index e1542aef..875dd938 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ komorebic/applications.json /.vs /bar-schema /komorebi-schema -/.wrangler \ No newline at end of file +/.wrangler +/.xwin-cache +result +/.direnv diff --git a/Cargo.toml b/Cargo.toml index 8af8099c..e71a4fba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,14 +2,14 @@ resolver = "2" members = [ - "komorebi", - "komorebi-client", - "komorebi-gui", - "komorebic", - "komorebic-no-console", - "komorebi-bar", - "komorebi-themes", - "komorebi-shortcuts", + "komorebi", + "komorebi-client", + "komorebi-gui", + "komorebic", + "komorebic-no-console", + "komorebi-bar", + "komorebi-themes", + "komorebi-shortcuts", ] [workspace.dependencies] @@ -48,32 +48,32 @@ which = "8" [workspace.dependencies.windows] version = "0.62" features = [ - "Foundation_Numerics", - "Win32_Devices", - "Win32_Devices_Display", - "Win32_System_Com", - "Win32_UI_Shell_Common", # for IObjectArray - "Win32_Foundation", - "Win32_Globalization", - "Win32_Graphics_Dwm", - "Win32_Graphics_Gdi", - "Win32_Graphics_Direct2D", - "Win32_Graphics_Direct2D_Common", - "Win32_Graphics_Dxgi_Common", - "Win32_System_LibraryLoader", - "Win32_System_Power", - "Win32_System_RemoteDesktop", - "Win32_System_Threading", - "Win32_UI_Accessibility", - "Win32_UI_HiDpi", - "Win32_UI_Input_KeyboardAndMouse", - "Win32_UI_Shell", - "Win32_UI_Shell_Common", - "Win32_UI_WindowsAndMessaging", - "Win32_System_SystemServices", - "Win32_System_WindowsProgramming", - "Media", - "Media_Control", + "Foundation_Numerics", + "Win32_Devices", + "Win32_Devices_Display", + "Win32_System_Com", + "Win32_UI_Shell_Common", # for IObjectArray + "Win32_Foundation", + "Win32_Globalization", + "Win32_Graphics_Dwm", + "Win32_Graphics_Gdi", + "Win32_Graphics_Direct2D", + "Win32_Graphics_Direct2D_Common", + "Win32_Graphics_Dxgi_Common", + "Win32_System_LibraryLoader", + "Win32_System_Power", + "Win32_System_RemoteDesktop", + "Win32_System_Threading", + "Win32_UI_Accessibility", + "Win32_UI_HiDpi", + "Win32_UI_Input_KeyboardAndMouse", + "Win32_UI_Shell", + "Win32_UI_Shell_Common", + "Win32_UI_WindowsAndMessaging", + "Win32_System_SystemServices", + "Win32_System_WindowsProgramming", + "Media", + "Media_Control", ] [profile.release-opt] @@ -82,3 +82,6 @@ lto = true panic = "abort" codegen-units = 1 strip = true + +[workspace.metadata.crane] +name = "komorebi-workspace" diff --git a/deny.toml b/deny.toml index 208db712..d8230a7d 100644 --- a/deny.toml +++ b/deny.toml @@ -1,8 +1,8 @@ [graph] targets = [ - "x86_64-pc-windows-msvc", - "i686-pc-windows-msvc", - "aarch64-pc-windows-msvc", + "x86_64-pc-windows-msvc", + "i686-pc-windows-msvc", + "aarch64-pc-windows-msvc", ] all-features = false no-default-features = false @@ -12,31 +12,31 @@ feature-depth = 1 [advisories] ignore = [ - { id = "RUSTSEC-2020-0016", reason = "local tcp connectivity is an opt-in feature, and there is no upgrade path for TcpStreamExt" }, - { id = "RUSTSEC-2024-0436", reason = "paste being unmaintained is not an issue in our use" }, - { id = "RUSTSEC-2024-0320", reason = "not using any yaml features from this library" }, - { id = "RUSTSEC-2025-0056", reason = "only used for colour palette generation" } + { id = "RUSTSEC-2020-0016", reason = "local tcp connectivity is an opt-in feature, and there is no upgrade path for TcpStreamExt" }, + { id = "RUSTSEC-2024-0436", reason = "paste being unmaintained is not an issue in our use" }, + { id = "RUSTSEC-2024-0320", reason = "not using any yaml features from this library" }, + { id = "RUSTSEC-2025-0056", reason = "only used for colour palette generation" }, ] [licenses] allow = [ - "0BSD", - "Apache-2.0", - "Apache-2.0 WITH LLVM-exception", - "Artistic-2.0", - "BSD-2-Clause", - "BSD-3-Clause", - "BSL-1.0", - "CC0-1.0", - "ISC", - "MIT", - "MIT-0", - "MPL-2.0", - "OFL-1.1", - "Ubuntu-font-1.0", - "Unicode-3.0", - "Zlib", - "LicenseRef-Komorebi-2.0" + "0BSD", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "Artistic-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "BSL-1.0", + "CC0-1.0", + "ISC", + "MIT", + "MIT-0", + "MPL-2.0", + "OFL-1.1", + "Ubuntu-font-1.0", + "Unicode-3.0", + "Zlib", + "LicenseRef-Komorebi-2.0", ] confidence-threshold = 0.8 @@ -112,12 +112,12 @@ unknown-registry = "deny" unknown-git = "deny" allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-git = [ - "https://github.com/LGUG2Z/base16-egui-themes", - "https://github.com/LGUG2Z/windows-icons", - "https://github.com/LGUG2Z/win32-display-data", - "https://github.com/LGUG2Z/flavours", - "https://github.com/LGUG2Z/base16_color_scheme", - "https://github.com/LGUG2Z/whkd", - "https://github.com/LGUG2Z/catppuccin-egui", - "https://github.com/amPerl/egui-phosphor", + "https://github.com/LGUG2Z/base16-egui-themes", + "https://github.com/LGUG2Z/windows-icons", + "https://github.com/LGUG2Z/win32-display-data", + "https://github.com/LGUG2Z/flavours", + "https://github.com/LGUG2Z/base16_color_scheme", + "https://github.com/LGUG2Z/whkd", + "https://github.com/LGUG2Z/catppuccin-egui", + "https://github.com/amPerl/egui-phosphor", ] diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..98d6efc2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,179 @@ +{ + "nodes": { + "crane": { + "locked": { + "lastModified": 1766774972, + "narHash": "sha256-8qxEFpj4dVmIuPn9j9z6NTbU+hrcGjBOvaxTzre5HmM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "01bc1d404a51a0a07e9d8759cd50a7903e218c82", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1765835352, + "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "git-hooks-nix": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765911976, + "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "git-hooks-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1766870016, + "narHash": "sha256-fHmxAesa6XNqnIkcS6+nIHuEmgd/iZSP/VXxweiEuQw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5c2bc52fb9f8c264ed6c93bd20afa2ff5e763dce", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "crane": "crane", + "flake-parts": "flake-parts", + "git-hooks-nix": "git-hooks-nix", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay", + "treefmt-nix": "treefmt-nix" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766890375, + "narHash": "sha256-0Zi7ChAtjq/efwQYmp7kOJPcSt6ya9ynSUe6ppgZhsQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "91e1f7a0017065360f447622d11b7ce6ed04772f", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766000401, + "narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..0723eb58 --- /dev/null +++ b/flake.nix @@ -0,0 +1,360 @@ +{ + description = "komorebi for Windows"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + crane.url = "github:ipetkov/crane"; + rust-overlay.url = "github:oxalica/rust-overlay"; + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + git-hooks-nix.url = "github:cachix/git-hooks.nix"; + git-hooks-nix.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = + inputs@{ + self, + nixpkgs, + flake-parts, + crane, + rust-overlay, + ... + }: + let + windowsSdkVersion = "10.0.26100"; + windowsCrtVersion = "14.44.17.14"; + + mkWindowsSdk = + pkgs: + pkgs.stdenvNoCC.mkDerivation { + name = "windows-sdk-${windowsSdkVersion}-crt-${windowsCrtVersion}"; + + nativeBuildInputs = [ pkgs.xwin ]; + + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "sha256-6cLS5q1BDRpLPScfmmKpTTEHUzsgKTKD1+mKvGX9Deo="; + + buildCommand = '' + export HOME=$(mktemp -d) + xwin --accept-license \ + --sdk-version ${windowsSdkVersion} \ + --crt-version ${windowsCrtVersion} \ + splat --output $out + ''; + }; + + mkMsvcEnv = + { pkgs, windowsSdk }: + let + clangVersion = pkgs.lib.versions.major pkgs.llvmPackages.clang.version; + in + { + # linker for the windows target + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER = "lld-link"; + + # c/c++ compiler + CC_x86_64_pc_windows_msvc = "clang-cl"; + CXX_x86_64_pc_windows_msvc = "clang-cl"; + AR_x86_64_pc_windows_msvc = "llvm-lib"; + + # IMPORTANT: libclang include path MUST come first to avoid header conflicts + CFLAGS_x86_64_pc_windows_msvc = builtins.concatStringsSep " " [ + "--target=x86_64-pc-windows-msvc" + "-Wno-unused-command-line-argument" + "-fuse-ld=lld-link" + "/imsvc${pkgs.llvmPackages.libclang.lib}/lib/clang/${clangVersion}/include" + "/imsvc${windowsSdk}/crt/include" + "/imsvc${windowsSdk}/sdk/include/ucrt" + "/imsvc${windowsSdk}/sdk/include/um" + "/imsvc${windowsSdk}/sdk/include/shared" + ]; + + CXXFLAGS_x86_64_pc_windows_msvc = builtins.concatStringsSep " " [ + "--target=x86_64-pc-windows-msvc" + "-Wno-unused-command-line-argument" + "-fuse-ld=lld-link" + "/imsvc${pkgs.llvmPackages.libclang.lib}/lib/clang/${clangVersion}/include" + "/imsvc${windowsSdk}/crt/include" + "/imsvc${windowsSdk}/sdk/include/ucrt" + "/imsvc${windowsSdk}/sdk/include/um" + "/imsvc${windowsSdk}/sdk/include/shared" + ]; + + # target-specific rust flags with linker flavor and library search paths + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS = builtins.concatStringsSep " " [ + "-Clinker-flavor=lld-link" + "-Lnative=${windowsSdk}/crt/lib/x86_64" + "-Lnative=${windowsSdk}/sdk/lib/um/x86_64" + "-Lnative=${windowsSdk}/sdk/lib/ucrt/x86_64" + ]; + + # cargo target + CARGO_BUILD_TARGET = "x86_64-pc-windows-msvc"; + }; + + mkKomorebiPackages = + { pkgs, windowsSdk }: + let + # toolchain with windows msvc target + toolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override { + targets = [ "x86_64-pc-windows-msvc" ]; + }; + craneLib = (crane.mkLib pkgs).overrideToolchain toolchain; + version = "0.1.0"; + + msvcEnv = mkMsvcEnv { inherit pkgs windowsSdk; }; + + src = pkgs.lib.cleanSourceWith { + src = ./.; + filter = + path: type: + (craneLib.filterCargoSources path type) + || (pkgs.lib.hasInfix "/docs/" path) + || (builtins.match ".*/docs/.*" path != null); + }; + + commonArgs = { + inherit src version; + strictDeps = true; + COMMIT_HASH = self.rev or (pkgs.lib.removeSuffix "-dirty" self.dirtyRev); + + # build inputs for cross-compilation + nativeBuildInputs = [ + pkgs.llvmPackages.clang-unwrapped + pkgs.llvmPackages.lld + pkgs.llvmPackages.llvm + ]; + + # cross-compilation environment + inherit (msvcEnv) + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER + CC_x86_64_pc_windows_msvc + CXX_x86_64_pc_windows_msvc + AR_x86_64_pc_windows_msvc + CFLAGS_x86_64_pc_windows_msvc + CXXFLAGS_x86_64_pc_windows_msvc + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS + CARGO_BUILD_TARGET + ; + }; + + cargoArtifacts = craneLib.buildDepsOnly commonArgs; + + individualCrateArgs = commonArgs // { + inherit cargoArtifacts; + doCheck = false; + doDoc = false; + }; + + fullBuild = craneLib.buildPackage ( + individualCrateArgs + // { + pname = "komorebi-workspace"; + } + ); + + extractBinary = + binaryName: + pkgs.runCommand "komorebi-${binaryName}" + { + meta = fullBuild.meta // { }; + } + '' + mkdir -p $out/bin + cp ${fullBuild}/bin/${binaryName}.exe $out/bin/ + ''; + in + { + inherit + craneLib + src + individualCrateArgs + fullBuild + msvcEnv + ; + komorebi = extractBinary "komorebi"; + komorebic = extractBinary "komorebic"; + komorebic-no-console = extractBinary "komorebic-no-console"; + komorebi-bar = extractBinary "komorebi-bar"; + komorebi-gui = extractBinary "komorebi-gui"; + komorebi-shortcuts = extractBinary "komorebi-shortcuts"; + }; + + mkPkgs = + system: + import nixpkgs { + inherit system; + overlays = [ (import rust-overlay) ]; + }; + in + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ + "aarch64-darwin" + "x86_64-linux" + "aarch64-linux" + ]; + + imports = [ + inputs.treefmt-nix.flakeModule + inputs.git-hooks-nix.flakeModule + ]; + + perSystem = + { config, system, ... }: + let + pkgs = mkPkgs system; + windowsSdk = mkWindowsSdk pkgs; + build = mkKomorebiPackages { inherit pkgs windowsSdk; }; + + # toolchain with windows target and nightly rustfmt + rustToolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override { + targets = [ "x86_64-pc-windows-msvc" ]; + }; + nightlyRustfmt = pkgs.rust-bin.nightly.latest.rustfmt; + rustToolchainWithNightlyRustfmt = pkgs.symlinkJoin { + name = "rust-toolchain-with-nightly-rustfmt"; + paths = [ + nightlyRustfmt + rustToolchain + ]; + }; + nightlyToolchain = pkgs.rust-bin.nightly.latest.default.override { + targets = [ "x86_64-pc-windows-msvc" ]; + }; + cargo-udeps = pkgs.writeShellScriptBin "cargo-udeps" '' + export PATH="${nightlyToolchain}/bin:$PATH" + exec ${pkgs.cargo-udeps}/bin/cargo-udeps "$@" + ''; + in + { + treefmt = { + projectRootFile = "flake.nix"; + programs = { + deadnix.enable = true; + just.enable = true; + nixfmt.enable = true; + taplo.enable = true; + rustfmt = { + enable = true; + package = pkgs.rust-bin.nightly.latest.rustfmt; + }; + }; + }; + + checks = { + komorebi-workspace-clippy = build.craneLib.cargoClippy ( + build.individualCrateArgs + // { + cargoClippyExtraArgs = "--all-targets -- -D warnings"; + } + ); + + komorebi-workspace-fmt = build.craneLib.cargoFmt { + inherit (build) src; + }; + + komorebi-workspace-toml-fmt = build.craneLib.taploFmt { + src = pkgs.lib.sources.sourceFilesBySuffices build.src [ ".toml" ]; + }; + + komorebi-workspace-deny = build.craneLib.cargoDeny { + inherit (build) src; + }; + + komorebi-workspace-nextest = build.craneLib.cargoNextest build.individualCrateArgs; + }; + + packages = { + inherit (build) + komorebi + komorebic + komorebic-no-console + komorebi-bar + komorebi-gui + komorebi-shortcuts + ; + inherit windowsSdk; + komorebi-full = build.fullBuild; + default = build.fullBuild; + }; + + apps = { + komorebi = { + type = "app"; + program = "${build.komorebi}/bin/komorebi.exe"; + }; + komorebic = { + type = "app"; + program = "${build.komorebic}/bin/komorebic.exe"; + }; + komorebic-no-console = { + type = "app"; + program = "${build.komorebic-no-console}/bin/komorebic-no-console.exe"; + }; + komorebi-bar = { + type = "app"; + program = "${build.komorebi-bar}/bin/komorebi-bar.exe"; + }; + komorebi-gui = { + type = "app"; + program = "${build.komorebi-gui}/bin/komorebi-gui.exe"; + }; + komorebi-shortcuts = { + type = "app"; + program = "${build.komorebi-shortcuts}/bin/komorebi-shortcuts.exe"; + }; + default = { + type = "app"; + program = "${build.fullBuild}/bin/komorebi.exe"; + }; + }; + + devShells.default = pkgs.mkShell { + name = "komorebi"; + + RUST_BACKTRACE = "full"; + + # cross-compilation environment + inherit (build.msvcEnv) + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER + CC_x86_64_pc_windows_msvc + CXX_x86_64_pc_windows_msvc + AR_x86_64_pc_windows_msvc + CFLAGS_x86_64_pc_windows_msvc + CXXFLAGS_x86_64_pc_windows_msvc + CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS + CARGO_BUILD_TARGET + ; + + packages = [ + rustToolchainWithNightlyRustfmt + cargo-udeps + + # cross-compilation tooling + pkgs.llvmPackages.clang-unwrapped # provides clang-cl + pkgs.llvmPackages.lld # provides lld-link + pkgs.llvmPackages.llvm # provides llvm-lib + + pkgs.cargo-deny + pkgs.cargo-nextest + pkgs.cargo-outdated + pkgs.jq + pkgs.just + pkgs.prettier + ]; + }; + + pre-commit = { + check.enable = true; + settings.hooks.treefmt = { + enable = true; + package = config.treefmt.build.wrapper; + pass_filenames = false; + }; + }; + }; + }; +} diff --git a/justfile b/justfile index 15d7bbd7..7c562ad2 100644 --- a/justfile +++ b/justfile @@ -96,6 +96,14 @@ schemapub: npx wrangler pages deploy --project-name komorebi .\komorebi-schema npx wrangler pages deploy --project-name komorebi-bar .\bar-schema +depcheck: + cargo outdated --depth 2 + cargo udeps --quiet + +deps: + cargo update + just depgen + depgen: cargo deny check cargo deny list --format json | jq 'del(.unlicensed)' > dependencies.json diff --git a/komorebi-bar/Cargo.toml b/komorebi-bar/Cargo.toml index 60e7ab4d..313d79e9 100644 --- a/komorebi-bar/Cargo.toml +++ b/komorebi-bar/Cargo.toml @@ -44,4 +44,8 @@ windows-icons-fallback = { package = "windows-icons", git = "https://github.com/ [features] default = ["schemars"] -schemars = ["dep:schemars", "komorebi-client/default", "komorebi-themes/default"] +schemars = [ + "dep:schemars", + "komorebi-client/default", + "komorebi-themes/default", +] diff --git a/komorebi-gui/Cargo.toml b/komorebi-gui/Cargo.toml index 5037f326..e51042fb 100644 --- a/komorebi-gui/Cargo.toml +++ b/komorebi-gui/Cargo.toml @@ -13,4 +13,4 @@ egui_extras = { workspace = true } random_word = { version = "0.5", features = ["en"] } serde_json = { workspace = true } windows-core = { workspace = true } -windows = { workspace = true } \ No newline at end of file +windows = { workspace = true } diff --git a/komorebi-shortcuts/Cargo.toml b/komorebi-shortcuts/Cargo.toml index 81e38564..a497856f 100644 --- a/komorebi-shortcuts/Cargo.toml +++ b/komorebi-shortcuts/Cargo.toml @@ -8,4 +8,4 @@ whkd-parser = { git = "https://github.com/LGUG2Z/whkd", rev = "v0.2.10" } whkd-core = { git = "https://github.com/LGUG2Z/whkd", rev = "v0.2.10" } eframe = { workspace = true } -dirs = { workspace = true } \ No newline at end of file +dirs = { workspace = true } diff --git a/komorebi-themes/Cargo.toml b/komorebi-themes/Cargo.toml index 593b30cc..078d4cc3 100644 --- a/komorebi-themes/Cargo.toml +++ b/komorebi-themes/Cargo.toml @@ -6,7 +6,9 @@ edition = "2024" [dependencies] base16-egui-themes = { git = "https://github.com/LGUG2Z/base16-egui-themes", rev = "b9e26b31f7a0e7ed239b14e5317e95d1bdc544bd" } #catppuccin-egui = { version = "5", default-features = false, features = ["egui32"] } -catppuccin-egui = { git = "https://github.com/LGUG2Z/catppuccin-egui", rev = "b2f95cbf441d1dd99f3c955ef10dcb84ce23c20a", default-features = false, features = ["egui33"] } +catppuccin-egui = { git = "https://github.com/LGUG2Z/catppuccin-egui", rev = "b2f95cbf441d1dd99f3c955ef10dcb84ce23c20a", default-features = false, features = [ + "egui33", +] } eframe = { workspace = true } schemars = { workspace = true, optional = true } serde = { workspace = true } diff --git a/komorebi/src/core/default_layout.rs b/komorebi/src/core/default_layout.rs index 2f7d5691..f4bd365a 100644 --- a/komorebi/src/core/default_layout.rs +++ b/komorebi/src/core/default_layout.rs @@ -16,7 +16,7 @@ use super::Sizing; pub enum DefaultLayout { /// BSP Layout /// - /// ``` + /// ```text /// +-------+-----+ /// | | | /// | +--+--+ @@ -26,7 +26,7 @@ pub enum DefaultLayout { BSP, /// Columns Layout /// - /// ``` + /// ```text /// +--+--+--+--+ /// | | | | | /// | | | | | @@ -36,7 +36,7 @@ pub enum DefaultLayout { Columns, /// Rows Layout /// - /// ``` + /// ```text /// +-----------+ /// |-----------| /// |-----------| @@ -46,7 +46,7 @@ pub enum DefaultLayout { Rows, /// Vertical Stack Layout /// - /// ``` + /// ```text /// +-------+-----+ /// | | | /// | +-----+ @@ -56,7 +56,7 @@ pub enum DefaultLayout { VerticalStack, /// Horizontal Stack Layout /// - /// ``` + /// ```text /// +------+------+ /// | | /// |------+------+ @@ -66,7 +66,7 @@ pub enum DefaultLayout { HorizontalStack, /// Ultrawide Vertical Stack Layout /// - /// ``` + /// ```text /// +-----+-----------+-----+ /// | | | | /// | | +-----+ @@ -78,7 +78,7 @@ pub enum DefaultLayout { UltrawideVerticalStack, /// Grid Layout /// - /// ``` + /// ```text /// +-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ /// | | | | | | | | | | | | | | | /// | | | | | | | | | | | | | +---+ @@ -87,11 +87,11 @@ pub enum DefaultLayout { /// | | | | | | | | | | | | | | | /// +-----+-----+ +---+---+---+ +---+---+---+ +---+---+---+ /// 4 windows 5 windows 6 windows 7 windows - ///``` + /// ``` Grid, /// Right Main Vertical Stack Layout /// - /// ``` + /// ```text /// +-----+-------+ /// | | | /// +-----+ | @@ -101,7 +101,7 @@ pub enum DefaultLayout { RightMainVerticalStack, /// Scrolling Layout /// - /// ``` + /// ```text /// +--+--+--+--+--+--+ /// | | | | /// | | | | diff --git a/komorebic-no-console/Cargo.toml b/komorebic-no-console/Cargo.toml index e19372b4..e01db53b 100644 --- a/komorebic-no-console/Cargo.toml +++ b/komorebic-no-console/Cargo.toml @@ -8,5 +8,3 @@ edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] - - diff --git a/komorebic/Cargo.toml b/komorebic/Cargo.toml index fb1a8144..345b2e3b 100644 --- a/komorebic/Cargo.toml +++ b/komorebic/Cargo.toml @@ -41,4 +41,4 @@ default = ["schemars"] schemars = ["dep:schemars", "komorebi-client/default"] [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(FALSE)'] } \ No newline at end of file +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(FALSE)'] } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 31578d3b..292fe499 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" \ No newline at end of file +channel = "stable" diff --git a/rustfmt.toml b/rustfmt.toml index 74c8af67..63df91e0 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +1 @@ -imports_granularity = "Item" \ No newline at end of file +imports_granularity = "Item" diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 3261c5e6..00000000 --- a/shell.nix +++ /dev/null @@ -1,12 +0,0 @@ -{pkgs ? import {}}: -with pkgs; - mkShell { - name = "komorebi"; - - buildInputs = [ - python311Packages.mkdocs-material - python311Packages.mkdocs-macros - python311Packages.setuptools - python311Packages.json-schema-for-humans - ]; - }