Files
komorebi/Cargo.toml
T
LGUG2Z 88aa78b874 feat(wm): a command socket and the first messages
Until now the daemon tiled what KWin reported and nothing else could reach it.
komorebi takes its orders on a socket, as it does on Windows and on macOS: it
handles no key itself, and whatever binds keys runs a command that writes a
message.

The daemon binds komorebi.sock in $XDG_RUNTIME_DIR/komorebi (DATA_DIR), reads
one JSON SocketMessage per line on a thread per connection, and handles each
message with the window manager locked, as the thread that handles events does.
The first messages are the ones the first komorebic needs: State (the window
manager as JSON, from state.rs), MonitorInformation, Query with a StateQuery,
Retile and Stop. A question is answered on the same connection, and the answer
ends when the daemon closes it. Stop unloads the bridge from KWin, removes the
socket and exits; so does a stop signal.

The socket is bound once the daemon is connected to KWin, so a komorebi that
cannot connect, such as a second one in the same session, which the bus refuses,
leaves the socket of the one that runs alone. With --fake-backend the daemon
answers on its socket with no compositor at all, which is how the tests run it.

komorebi-client is the other end: send_message, send_batch and send_query, and
the types the messages are made of. Its doctests serve the socket themselves,
tests/daemon.rs runs it against a window manager over the fake desktop, and
komorebi/tests/socket.rs runs the daemon binary from its start to a Stop.
2026-10-27 15:17:30 -07:00

31 lines
897 B
TOML

[workspace]
resolver = "2"
members = ["komorebi", "komorebi-client", "version"]
[workspace.package]
version = "0.1.0"
[workspace.dependencies]
# upstream's layouts, at a revision that has the fix for resizing a tile by dragging its edge
# (LGUG2Z/komorebi#1765) and the placement helpers komorebi for KDE uses
komorebi-layouts = { git = "https://github.com/LGUG2Z/komorebi", rev = "f08aa55511d77ca56ab0e789efabeb0a237a463e", features = [
"schemars",
] }
clap = { version = "4", features = ["derive", "wrap_help"] }
color-eyre = "0.6"
crossbeam-channel = "0.5"
dirs = "6"
lazy_static = "1"
pastey = "0.2"
schemars = "1.1"
serde = { version = "1", features = ["derive"] }
serde_json = { package = "serde_json_lenient", version = "0.2" }
shadow-rs = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[workspace.metadata.crane]
name = "komorebi-workspace"