fix(schema): flatten bar mouse config opts

This commit is contained in:
LGUG2Z
2025-05-26 09:52:14 -07:00
parent b4e61b079c
commit 3d373b3630
2 changed files with 51724 additions and 51887 deletions
+1 -2
View File
@@ -332,6 +332,7 @@ pub fn get_individual_spacing(
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[serde(untagged)]
pub enum MouseMessage { pub enum MouseMessage {
/// Send a message to the komorebi client. /// Send a message to the komorebi client.
/// By default, a batch of messages are sent in the following order: /// By default, a batch of messages are sent in the following order:
@@ -367,12 +368,10 @@ pub enum MouseMessage {
/// } /// }
/// } /// }
/// ``` /// ```
#[serde(untagged)]
Komorebi(KomorebiMouseMessage), Komorebi(KomorebiMouseMessage),
/// Execute a custom command. /// Execute a custom command.
/// CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. /// CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved.
/// Example: `komorebic toggle-pause` /// Example: `komorebic toggle-pause`
#[serde(untagged)]
Command(String), Command(String),
} }
+9 -171
View File
@@ -3108,15 +3108,9 @@
}, },
"on_extra1_click": { "on_extra1_click": {
"description": "Command to send on extra1/back button click", "description": "Command to send on extra1/back button click",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -9183,36 +9177,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_extra2_click": { "on_extra2_click": {
"description": "Command to send on extra2/forward button click", "description": "Command to send on extra2/forward button click",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -15279,36 +15255,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_middle_click": { "on_middle_click": {
"description": "Command to send on middle button click", "description": "Command to send on middle button click",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -21375,36 +21333,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_primary_double_click": { "on_primary_double_click": {
"description": "Command to send on primary/left double button click", "description": "Command to send on primary/left double button click",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -27471,36 +27411,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_scroll_down": { "on_scroll_down": {
"description": "Command to send on scrolling down (every tick)", "description": "Command to send on scrolling down (every tick)",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -33567,36 +33489,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_scroll_left": { "on_scroll_left": {
"description": "Command to send on scrolling left (every tick)", "description": "Command to send on scrolling left (every tick)",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -39663,36 +39567,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_scroll_right": { "on_scroll_right": {
"description": "Command to send on scrolling right (every tick)", "description": "Command to send on scrolling right (every tick)",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -45759,36 +45645,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_scroll_up": { "on_scroll_up": {
"description": "Command to send on scrolling up (every tick)", "description": "Command to send on scrolling up (every tick)",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -51855,36 +51723,18 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"on_secondary_click": { "on_secondary_click": {
"description": "Command to send on secondary/right button click", "description": "Command to send on secondary/right button click",
"oneOf": [ "anyOf": [
{ {
"description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```", "description": "Send a message to the komorebi client. By default, a batch of messages are sent in the following order: FocusMonitorAtCursor => MouseFollowsFocus(false) => {message} => MouseFollowsFocus({original.value})\n\nExample: ```json \"on_extra2_click\": { \"message\": { \"type\": \"NewWorkspace\" } }, ``` or: ```json \"on_middle_click\": { \"focus_monitor_at_cursor\": false, \"ignore_mouse_follows_focus\": false, \"message\": { \"type\": \"TogglePause\" } } ``` or: ```json \"on_scroll_up\": { \"message\": { \"type\": \"CycleFocusWorkspace\", \"content\": \"Previous\" } } ```",
"type": "object",
"required": [
"Komorebi"
],
"properties": {
"Komorebi": {
"type": "object", "type": "object",
"required": [ "required": [
"message" "message"
@@ -57951,23 +57801,11 @@
] ]
} }
} }
}
},
"additionalProperties": false
}, },
{ {
"description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`", "description": "Execute a custom command. CMD (%variable%), Bash ($variable) and PowerShell ($Env:variable) variables will be resolved. Example: `komorebic toggle-pause`",
"type": "object",
"required": [
"Command"
],
"properties": {
"Command": {
"type": "string" "type": "string"
} }
},
"additionalProperties": false
}
] ]
}, },
"vertical_scroll_threshold": { "vertical_scroll_threshold": {