diff --git a/komorebi-for-mac/komorebi/src/core/mod.rs b/komorebi-for-mac/komorebi/src/core/mod.rs index d79df333..56670e31 100644 --- a/komorebi-for-mac/komorebi/src/core/mod.rs +++ b/komorebi-for-mac/komorebi/src/core/mod.rs @@ -210,11 +210,13 @@ pub enum ApplicationIdentifier { /// Executable name #[serde(alias = "exe")] Exe, - /// Role or subrole + // the description is part of the checked-in schemas, which differ per platform + #[cfg_attr(target_os = "windows", doc = " Class")] + #[cfg_attr(not(target_os = "windows"), doc = " Role or subrole")] #[serde(alias = "class")] Class, - /// Window title #[serde(alias = "title")] + /// Window title Title, /// Executable path #[serde(alias = "path")] @@ -236,16 +238,26 @@ pub enum ApplicationIdentifier { Hash, )] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +/// What a window is to the layout, which decides the color of its border pub enum WindowKind { + /// Single window Single, + /// Stack container Stack, + /// Monocle container Monocle, #[default] + /// Unfocused window Unfocused, + /// Unfocused locked container UnfocusedLocked, + /// Floating window Floating, } +/// A question about the window manager that `SocketMessage::Query` asks, answered with one +/// value as text: an index, the name of a layout or of a container kind, or the version of the +/// daemon. #[derive(Copy, Clone, Debug, Serialize, Deserialize, Display, EnumString, ValueEnum)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub enum StateQuery { @@ -259,6 +271,14 @@ pub enum StateQuery { Version, } +/// The options of a subscriber, which `SocketMessage::AddSubscriberSocketWithOptions` sets +/// +/// A subscriber added with `SocketMessage::AddSubscriberSocket` has the default options, and is +/// sent a notification for every event and message the window manager handles. With +/// `filter_state_changes`, it is sent one only when the event or the message changed the +/// state, and always when a window is shown, when a subscriber is added (so a new subscriber +/// receives the state as soon as it subscribes), when a theme is set (the colors of the borders +/// are not part of the state) and when the configuration is reloaded. #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct SubscribeOptions {