Files
komorebi/flake.nix
T
LGUG2Z df9ceee17e feat(wm): migrate ipc and impl basic socket messages
This commit migrates another bunch of code from komorebi to start
implementing inter-process communication using Unix domain sockets.

For this commit a small subsection of the SocketMessage with maximum
utility has been migrated: FocusWindow, MoveWindow, ChangeLayout, and
TogglePause.

This includes migrating their handlers in process_command, and setting
up a UnixListener when creating a WindowManager instance.

To be able to test this functionality I also implemented a basic
skeleton of komorebic and migrated the komorebi-client library.

There are some random fixes included here now that we are listening to a
UnixListener on a separate thread, which includes wrapping structs from
the objc2 crate which don't have Send and Sync implemented, so that they
can be implemented in the komorebi lib.

I also took the time to figure out how to calculate a monitor's work
area size, excluding the dock and the menu bar, and started to split out
Workspace and Monitor into their own modules.

It looks like a lot of changes but most if this is just pulling in stuff
from the Windows implementation.
2025-09-17 16:18:06 -07:00

70 lines
1.8 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
crane.url = "github:ipetkov/crane";
};
outputs = inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (
system: let
overlays = [
(import rust-overlay)
];
pkgs = (import nixpkgs) {
inherit system overlays;
};
inherit (pkgs) lib;
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
src = craneLib.cleanCargoSource ./.;
version = "0.1.0";
commonArgs = {
inherit src;
nativeBuildInputs = with pkgs; [];
doCheck = false;
buildInputs = with pkgs; [
gcc
libiconv
];
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
komorebi = craneLib.buildPackage (
commonArgs
// {
inherit version;
pname = "komorebi";
cargoExtraArgs = "-p komorebi";
src = ./.;
}
);
komorebic = craneLib.buildPackage (
commonArgs
// {
inherit version;
pname = "komorebic";
cargoExtraArgs = "-p komorebic";
src = ./.;
}
);
in {
devShells = flake-utils.lib.flattenTree {
default = import ./shell.nix {inherit pkgs;};
};
packages = flake-utils.lib.flattenTree rec {
inherit komorebi komorebic;
default = komorebi;
};
}
);
}