diff --git a/komorebi-recorder/src/analysis/catalog.rs b/komorebi-recorder/src/analysis/catalog.rs index 29a247b8..70b543b1 100644 --- a/komorebi-recorder/src/analysis/catalog.rs +++ b/komorebi-recorder/src/analysis/catalog.rs @@ -146,6 +146,7 @@ pub fn of(flavor: Flavor) -> &'static Catalog { match flavor { Flavor::Macos => &MAC, Flavor::Windows => &WINDOWS, + Flavor::Kde => &KDE, } } @@ -776,6 +777,7 @@ pub fn skew(flavor: Flavor, versions: &[KomorebiVersion], root: Option<&std::pat match flavor { Flavor::Macos => "KOMOREBI_MAC_SRC", Flavor::Windows => "KOMOREBI_WINDOWS_SRC", + Flavor::Kde => "KOMOREBI_KDE_SRC", } )); } diff --git a/komorebi-recorder/src/analysis/flavor/kde.rs b/komorebi-recorder/src/analysis/flavor/kde.rs new file mode 100644 index 00000000..3bbb56a9 --- /dev/null +++ b/komorebi-recorder/src/analysis/flavor/kde.rs @@ -0,0 +1,471 @@ +//! komorebi for KDE, as it describes itself. +//! +//! [`KdeRules`] is the [`Rules`] of [`Flavor::Kde`]. It keeps the defaults of +//! [`Rules::window_is_unreadable`] and answers `false` to [`Rules::verified`]: it was written from +//! komorebi for KDE's source, and has not been checked against a recording of it. What the rules +//! rely on: +//! +//! - A window event serializes as `{"type": "Show", "content": [{"type": "KWin", "content": +//! "WindowAdded"}, ]}`, where the first part is the compositor signal the bridge script +//! heard (`{"type": "Manual", ...}` is komorebi making one up) and the window is `{"id": ..., +//! "rect": ..., "details": {"title": ..., "exe": ..., "class": ..., "path": ...}}`. `Manage` and +//! `Unmanage` carry the window alone, and a `WorkspaceChange` carries a monitor id and a +//! workspace index in the place of the window. There is no process id. +//! - A monitor notification is a one-entry object (`{"Resize": 0}`, +//! `{"DisplayConnectionChange": 0}`), or the bare string `"Wake"`. +//! - A window in the `State` is known by its `id`, a number komorebi gave it (not KWin's UUID). +//! - The log has a header line for each handler, `processing event: for window with +//! notification ` inside a `handle_event` span, and `processing command: ` +//! inside a `process_command` span, where a command ends with `processed command: `. An +//! event's handler is timed by a debug line, `handled in