mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-21 08:01:39 +01:00
Configuration, commands and the layout code all speak in the same small types:
how a new window is added to a workspace, what happens to a window that crosses
a monitor boundary, which kind of window a border colour is for, how an
application is matched by what it calls itself. They are defined once, in
`core`, with the layout types re-exported next to them so that the rest of the
crate imports from one place.
The layouts themselves are `komorebi-layouts` from komorebi, a git dependency as
in komorebi for Mac, at f08aa55 (the tip of master when this was written). That
revision has the fix for resizing a tile by dragging its edge
(LGUG2Z/komorebi#1765) and the placement helpers this port uses, so nothing is
vendored. The crate pulls in serde_yaml, which has an advisory
(RUSTSEC-2024-0449, unmaintained unsafe-libyaml) for reading the Windows-only
custom layouts; nothing here calls it, and deny.toml says so where it ignores
the advisory.
The module also has what the rest is built from. `Ring` is a list with one
focused element, which monitors, workspaces and containers each keep their
children in; it has the unit tests and the example upstream's version never had.
`lockable_sequence` keeps locked containers at their positions when others are
inserted or removed around them. `core::pathext` resolves environment variables
in configured paths, and `core::config_generation` has the rules that match an
application, with tests for the two shapes a rule takes in JSON (an object, and
a list that must all match).
Types that belong to a feature come with the feature: the socket messages, the
placement rules and the animation styles are not here. The `impl_ring_elements`
macro waits for the first type that uses it.
Every module has a `//!` summary, and the README says what the library has.
26 lines
740 B
TOML
26 lines
740 B
TOML
[workspace]
|
|
|
|
resolver = "2"
|
|
members = ["komorebi", "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"
|
|
schemars = "1.1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = { package = "serde_json_lenient", version = "0.2" }
|
|
shadow-rs = "1"
|
|
tracing = "0.1"
|
|
|
|
[workspace.metadata.crane]
|
|
name = "komorebi-workspace"
|