{"record":{"id":"547ba3f39c2bc491","repo":"LGUG2Z/komorebi","slug":"ignoring-command-while-active-window-is-in-monocle","errorCode":null,"errorMessage":"ignoring command while active window is in monocle mode or maximized","messagePattern":"ignoring command while active window is in monocle mode or maximized","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"komorebi/src/window_manager.rs","lineNumber":2392,"sourceCode":"        }\n\n        Ok(())\n    }\n\n    #[tracing::instrument(skip(self))]\n    pub fn move_container_in_direction(\n        &mut self,\n        direction: OperationDirection,\n    ) -> eyre::Result<()> {\n        self.handle_unmanaged_window_behaviour()?;\n\n        let workspace = self.focused_workspace()?;\n        let workspace_idx = self.focused_workspace_idx()?;\n\n        // removing this messes up the monitor / container / window index somewhere\n        // and results in the wrong window getting moved across the monitor boundary\n        if workspace.is_focused_window_monocle_or_maximized()? {\n            bail!(\"ignoring command while active window is in monocle mode or maximized\");\n        }\n\n        tracing::info!(\"moving container\");\n\n        let origin_container_idx = workspace.focused_container_idx();\n        let origin_monitor_idx = self.focused_monitor_idx();\n        let target_container_idx = workspace.new_idx_for_direction(direction);\n\n        // this is for when we are scrolling across workspaces like PaperWM\n        if target_container_idx.is_none()\n            && matches!(\n                self.cross_boundary_behaviour,\n                CrossBoundaryBehaviour::Workspace\n            )\n            && matches!(\n                direction,\n                OperationDirection::Left | OperationDirection::Right\n            )","sourceCodeStart":2374,"sourceCodeEnd":2410,"githubUrl":"https://github.com/LGUG2Z/komorebi/blob/e0709f02bfae4e503bf4640f58ee75ecbbfdbb97/komorebi/src/window_manager.rs#L2374-L2410","documentation":"move_container_in_direction early-returns an error when the focused window is in monocle mode or is (native) maximized. Rearranging containers in a direction is meaningless/unsafe for a window occupying the whole workspace, so komorebi bails before computing origin/target indices.","triggerScenarios":"Calling move_container_in_direction (move-left/right/up/down keybinds, komorebic move) while is_focused_window_monocle_or_maximized() returns true — window is in monocle layout or maximized state.","commonSituations":"User toggles monocle (komorebic monocle-mode) or maximizes a window, then presses directional move hotkeys; hotkey daemons send the command unconditionally.","solutions":["Exit monocle mode (komorebic monocle-mode toggle) or unmaximize before moving","Configure hotkeys to check state first and skip the move when monocle/maximized","Treat the error as an expected no-op in hotkey handlers and swallow it","Verify the focused window is actually tiled if the error seems spurious"],"exampleFix":"// before\nkomorebic move left // fails in monocle mode\n// after\nkomorebic monocle-mode toggle 2>/dev/null; komorebic move left","handlingStrategy":"try-catch","validationCode":"// only issue directional moves when not in monocle/maximized state\n// (komorebi config can use \"until\" conditions for such commands)","typeGuard":null,"tryCatchPattern":"match komorebic move left {\n    Err(e) if e.contains(\"monocle mode or maximized\") => Ok(()), // expected no-op\n    other => other,\n}","preventionTips":["Exit monocle/maximize before rearranging containers","Route directional-move hotkeys through a state-aware dispatcher","Treat this message as an expected no-op"],"tags":["windows","window-manager","monocle","maximized-window"],"backgroundTag":"invalid-state-transition","analyzedSha":"e0709f02bfae4e503bf4640f58ee75ecbbfdbb97","analyzedAt":"2026-09-06T07:08:05.107Z","contentChangedAt":"2026-09-06T07:08:05.107Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}