mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
refactor(wm): migrate entire socketmessage enum
To give me a better idea of how the question for SocketMessage handling parity is going, I have copied over the entire SocketCommand enum from the Windows repo and commented out anything not yet implemented.
This commit is contained in:
1 parent
a31dcbc54c
commit
dddd79d39d
1 file changed
+138
-17
+138
-17
@@ -175,6 +175,7 @@ pub enum StateQuery {
|
||||
Version,
|
||||
}
|
||||
|
||||
// serde_as must be before derive
|
||||
#[serde_with::serde_as]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, Display)]
|
||||
#[serde(tag = "type", content = "content")]
|
||||
@@ -210,23 +211,53 @@ pub enum SocketMessage {
|
||||
CycleMoveWorkspaceToMonitor(CycleDirection),
|
||||
MoveWorkspaceToMonitorNumber(usize),
|
||||
SwapWorkspacesToMonitorNumber(usize),
|
||||
ChangeLayout(DefaultLayout),
|
||||
CycleLayout(CycleDirection),
|
||||
FlipLayout(Axis),
|
||||
ToggleWorkspaceWindowContainerBehaviour,
|
||||
ToggleWorkspaceFloatOverride,
|
||||
// ForceFocus,
|
||||
// Close,
|
||||
// Minimize,
|
||||
Promote,
|
||||
PromoteFocus,
|
||||
PromoteWindow(OperationDirection),
|
||||
// EagerFocus(String),
|
||||
// LockMonitorWorkspaceContainer(usize, usize, usize),
|
||||
// UnlockMonitorWorkspaceContainer(usize, usize, usize),
|
||||
ToggleLock,
|
||||
ToggleFloat,
|
||||
ToggleMonocle,
|
||||
// ToggleMaximize,
|
||||
ToggleWindowContainerBehaviour,
|
||||
ToggleFloatOverride,
|
||||
// WindowHidingBehaviour(HidingBehaviour),
|
||||
ToggleCrossMonitorMoveBehaviour,
|
||||
// CrossMonitorMoveBehaviour(MoveBehaviour),
|
||||
// UnmanagedWindowOperationBehaviour(OperationBehaviour),
|
||||
// Current Workspace Commands
|
||||
// ManageFocusedWindow,
|
||||
// UnmanageFocusedWindow,
|
||||
// AdjustContainerPadding(Sizing, i32),
|
||||
// AdjustWorkspacePadding(Sizing, i32),
|
||||
ChangeLayout(DefaultLayout),
|
||||
CycleLayout(CycleDirection),
|
||||
// ScrollingLayoutColumns(NonZeroUsize),
|
||||
// ChangeLayoutCustom(#[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
FlipLayout(Axis),
|
||||
ToggleWorkspaceWindowContainerBehaviour,
|
||||
ToggleWorkspaceFloatOverride,
|
||||
// Monitor and Workspace Commands
|
||||
// MonitorIndexPreference(usize, i32, i32, i32, i32),
|
||||
// DisplayIndexPreference(usize, String),
|
||||
// EnsureWorkspaces(usize, usize),
|
||||
// EnsureNamedWorkspaces(usize, Vec<String>),
|
||||
// NewWorkspace,
|
||||
ToggleTiling,
|
||||
ToggleWindowBasedWorkAreaOffset,
|
||||
// Stop,
|
||||
// StopIgnoreRestore,
|
||||
TogglePause,
|
||||
ToggleWorkspaceLayer,
|
||||
// TODO: look into maximized windows
|
||||
// ToggleMaximize,
|
||||
Retile,
|
||||
RetileWithResizeDimensions,
|
||||
// QuickSave,
|
||||
// QuickLoad,
|
||||
// Save(#[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
// Load(#[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
CycleFocusMonitor(CycleDirection),
|
||||
CycleFocusWorkspace(CycleDirection),
|
||||
CycleFocusEmptyWorkspace(CycleDirection),
|
||||
@@ -238,20 +269,110 @@ pub enum SocketMessage {
|
||||
FocusWorkspaceNumbers(usize),
|
||||
FocusMonitorWorkspaceNumber(usize, usize),
|
||||
FocusNamedWorkspace(String),
|
||||
Retile,
|
||||
RetileWithResizeDimensions,
|
||||
Promote,
|
||||
PromoteFocus,
|
||||
PromoteWindow(OperationDirection),
|
||||
// ContainerPadding(usize, usize, i32),
|
||||
// NamedWorkspaceContainerPadding(String, i32),
|
||||
// FocusedWorkspaceContainerPadding(i32),
|
||||
// WorkspacePadding(usize, usize, i32),
|
||||
// NamedWorkspacePadding(String, i32),
|
||||
// FocusedWorkspacePadding(i32),
|
||||
// WorkspaceTiling(usize, usize, bool),
|
||||
// NamedWorkspaceTiling(String, bool),
|
||||
// WorkspaceName(usize, usize, String),
|
||||
// WorkspaceLayout(usize, usize, DefaultLayout),
|
||||
// NamedWorkspaceLayout(String, DefaultLayout),
|
||||
// WorkspaceLayoutCustom(usize, usize, #[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
// NamedWorkspaceLayoutCustom(String, #[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
// WorkspaceLayoutRule(usize, usize, usize, DefaultLayout),
|
||||
// NamedWorkspaceLayoutRule(String, usize, DefaultLayout),
|
||||
// WorkspaceLayoutCustomRule(
|
||||
// usize,
|
||||
// usize,
|
||||
// usize,
|
||||
// #[serde_as(as = "ResolvedPathBuf")] PathBuf,
|
||||
// ),
|
||||
// NamedWorkspaceLayoutCustomRule(String, usize, #[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
// ClearWorkspaceLayoutRules(usize, usize),
|
||||
// ClearNamedWorkspaceLayoutRules(String),
|
||||
ToggleWorkspaceLayer,
|
||||
// Configuration
|
||||
// ReloadConfiguration,
|
||||
// ReplaceConfiguration(#[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
ReloadStaticConfiguration(#[serde_as(as = "ResolvedPathBuf")] PathBuf),
|
||||
// WatchConfiguration(bool),
|
||||
// CompleteConfiguration,
|
||||
// AltFocusHack(bool),
|
||||
// Theme(Box<KomorebiTheme>),
|
||||
// Animation(bool, Option<AnimationPrefix>),
|
||||
// AnimationDuration(u64, Option<AnimationPrefix>),
|
||||
// AnimationFps(u64),
|
||||
// AnimationStyle(AnimationStyle, Option<AnimationPrefix>),
|
||||
// #[serde(alias = "ActiveWindowBorder")]
|
||||
// Border(bool),
|
||||
// #[serde(alias = "ActiveWindowBorderColour")]
|
||||
// BorderColour(WindowKind, u32, u32, u32),
|
||||
// #[serde(alias = "ActiveWindowBorderStyle")]
|
||||
// BorderStyle(BorderStyle),
|
||||
// BorderWidth(i32),
|
||||
// BorderOffset(i32),
|
||||
// BorderImplementation(BorderImplementation),
|
||||
// Transparency(bool),
|
||||
// ToggleTransparency,
|
||||
// TransparencyAlpha(u8),
|
||||
// InvisibleBorders(Rect),
|
||||
// StackbarMode(StackbarMode),
|
||||
// StackbarLabel(StackbarLabel),
|
||||
// StackbarFocusedTextColour(u32, u32, u32),
|
||||
// StackbarUnfocusedTextColour(u32, u32, u32),
|
||||
// StackbarBackgroundColour(u32, u32, u32),
|
||||
// StackbarHeight(i32),
|
||||
// StackbarTabWidth(i32),
|
||||
// StackbarFontSize(i32),
|
||||
// StackbarFontFamily(Option<String>),
|
||||
// WorkAreaOffset(Rect),
|
||||
// MonitorWorkAreaOffset(usize, Rect),
|
||||
// WorkspaceWorkAreaOffset(usize, usize, Rect),
|
||||
ToggleWindowBasedWorkAreaOffset,
|
||||
// ResizeDelta(i32),
|
||||
// InitialWorkspaceRule(ApplicationIdentifier, String, usize, usize),
|
||||
// InitialNamedWorkspaceRule(ApplicationIdentifier, String, String),
|
||||
// WorkspaceRule(ApplicationIdentifier, String, usize, usize),
|
||||
// NamedWorkspaceRule(ApplicationIdentifier, String, String),
|
||||
// ClearWorkspaceRules(usize, usize),
|
||||
// ClearNamedWorkspaceRules(String),
|
||||
// ClearAllWorkspaceRules,
|
||||
// EnforceWorkspaceRules,
|
||||
SessionFloatRule,
|
||||
SessionFloatRules,
|
||||
ClearSessionFloatRules,
|
||||
#[serde(alias = "FloatRule")]
|
||||
// IgnoreRule(ApplicationIdentifier, String),
|
||||
// ManageRule(ApplicationIdentifier, String),
|
||||
// IdentifyObjectNameChangeApplication(ApplicationIdentifier, String),
|
||||
// IdentifyTrayApplication(ApplicationIdentifier, String),
|
||||
// IdentifyLayeredApplication(ApplicationIdentifier, String),
|
||||
// IdentifyBorderOverflowApplication(ApplicationIdentifier, String),
|
||||
State,
|
||||
GlobalState,
|
||||
VisibleWindows,
|
||||
MonitorInformation,
|
||||
Query(StateQuery),
|
||||
SessionFloatRule,
|
||||
SessionFloatRules,
|
||||
ClearSessionFloatRules,
|
||||
// FocusFollowsMouse(FocusFollowsMouseImplementation, bool),
|
||||
// ToggleFocusFollowsMouse(FocusFollowsMouseImplementation),
|
||||
// MouseFollowsFocus(bool),
|
||||
// ToggleMouseFollowsFocus,
|
||||
// RemoveTitleBar(ApplicationIdentifier, String),
|
||||
// ToggleTitleBars,
|
||||
// AddSubscriberSocket(String),
|
||||
// AddSubscriberSocketWithOptions(String, SubscribeOptions),
|
||||
// RemoveSubscriberSocket(String),
|
||||
// AddSubscriberPipe(String),
|
||||
// RemoveSubscriberPipe(String),
|
||||
// ApplicationSpecificConfigurationSchema,
|
||||
// NotificationSchema,
|
||||
// SocketSchema,
|
||||
// StaticConfigSchema,
|
||||
// GenerateStaticConfig,
|
||||
// DebugWindow(isize),
|
||||
}
|
||||
|
||||
impl SocketMessage {
|
||||
|
||||
Reference in new issue
Block a user