LGUG2Z/komorebi · info

there is only one window in this container

Error message

there is only one window in this container

What it means

cycle_container_window_in_direction cycles which window inside a container receives focus, and requires at least two windows to cycle meaningfully. If the focused container holds exactly one window there is nothing to cycle to, so komorebi throws instead of silently wrapping focus onto itself.

Source

Thrown at komorebi/src/window_manager.rs:2688

        &mut self,
        direction: CycleDirection,
    ) -> eyre::Result<()> {
        self.handle_unmanaged_window_behaviour()?;

        tracing::info!("cycling container windows");

        let container =
            if let Some(container) = &mut self.focused_workspace_mut()?.monocle_container {
                container
            } else {
                self.focused_container_mut()?
            };

        let len = NonZeroUsize::new(container.windows().len())
            .ok_or_eyre("there must be at least one window in a container")?;

        if len.get() == 1 {
            bail!("there is only one window in this container");
        }

        let current_idx = container.focused_window_idx();
        let next_idx = direction.next_idx(current_idx, len);

        container.focus_window(next_idx);
        container.load_focused_window();

        if let Some(window) = container.focused_window() {
            window.focus(self.mouse_follows_focus)?;
        }

        self.update_focused_workspace(self.mouse_follows_focus, true)
    }

    #[tracing::instrument(skip(self))]
    pub fn cycle_container_window_index_in_direction(
        &mut self,

View on GitHub (pinned to e0709f02bf)

Solutions

  1. Press the hotkey only on containers with stacked windows (multiple windows in one container cell)
  2. Stack another window into the container first (komorebic stack) to enable cycling
  3. Configure the keybind to cycle workspace windows instead of container windows if single-window containers are common
  4. Swallow this expected error in hotkey dispatch code
Defensive patterns

Strategy: validation

Validate before calling

// only cycle when container has >1 window
let count = query_focused_container_window_count();
if count > 1 { komorebic cycle-focus /* ... */ }

Prevention

When it happens

Trigger: Calling cycle_container_window_in_direction (komorebic cycle-focus / stack cycling keybinds) when container.windows().len() == 1 — a single window with no stack partners in the focused container.

Common situations: Binding cycle-window hotkeys globally and pressing them on any tiled window (most containers hold one window unless the user stacks/crops windows into a container); misuse of container stacking features.

Related errors


AI-assisted analysis of LGUG2Z/komorebi@e0709f02bf (2026-09-06). Data as JSON: /api/errors/b58dce4d3b6372ff. Report an issue: GitHub.