#1710·komorebi

[BUG]: Cursor position retained from previous workspace instead of restoring focus

Author: AdamUhhCreated May 13, 2026Updated Jun 24, 2026
Labelsbug

Summary

Workspace 1 has one window (Win A), Workspace 2 has two windows side by side (Win B 60% | Win C 40%),

Issue: When focused on Win C on workspace 2, switching to workspace 1 and then back to workspace 2 does not restore focus to Win C. Instead, the cursor position from workspace 1 is retained, causing focus to land on whichever window is under that cursor position. This behavior is also inconsistent, as it sometimes restores correctly.

https://github.com/user-attachments/assets/2f3007e8-c13d-4eb7-93d2-e31c2e83b56c

Expected behaviour: When returning to workspace 2, focus should be restored to Win C, the last focused window on that workspace.

Version Information

bash
OS Name:                       Microsoft Windows 11 Pro
OS Version:                    10.0.26100 N/A Build 26100

komorebic 0.1.41
tag:v0.1.41
commit_hash:24c0ce0b
build_time:2026-05-03 20:22:26 +00:00
build_env:rustc 1.95.0 (59807616e 2026-04-14),stable-x86_64-pc-windows-msvc

Komorebi Configuration

json
{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.40/schema.json",
  "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 2,
  "default_container_padding": 2,
  "border": true,
  "border_width": 4,
  "border_offset": -1,
  "theme": {
    "palette": "Catppuccin",
    "name": "Mocha",
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "1",
          "layout": "BSP"
        },
        {
          "name": "2",
          "layout": "BSP"
        },
        {
          "name": "3",
          "layout": "BSP"
        },
        {
          "name": "4",
          "layout": "BSP"
        },
        {
          "name": "5",
          "layout": "BSP"
        },
        {
          "name": "6",
          "layout": "BSP"
        },
        {
          "name": "7",
          "layout": "BSP"
        }
      ]
    }
  ]
}

Hotkey Configuration

bash
.shell powershell

# Reload whkd configuration
# alt + o                 : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd
alt + shift + o         : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell
alt + o                 : komorebic reload-configuration

alt + i                 : komorebic toggle-shortcuts

# App shortcuts - these require shell to be pwsh / powershell
# The apps will be focused if open, or launched if not open
# alt + f                 : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
# alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }

alt + q                 : komorebic close
alt + m                 : komorebic minimize

# Focus windows
alt + left              : komorebic focus left
alt + down                 : komorebic focus down
alt + up                 : komorebic focus up
alt + right                 : komorebic focus right
alt + oem_4     : komorebic cycle-focus previous # oem_4 is [
alt + oem_6     : komorebic cycle-focus next # oem_6 is ]

# Move windows
alt + shift + left         : komorebic move left
alt + shift + down         : komorebic move down
alt + shift + up         : komorebic move up
alt + shift + right         : komorebic move right
alt + shift + return    : komorebic promote

# Stack windows
# alt + left              : komorebic stack left
# alt + down              : komorebic stack down
# alt + up                : komorebic stack up
# alt + right             : komorebic stack right
# alt + oem_1             : komorebic unstack # oem_1 is ;
# alt + oem_4             : komorebic cycle-stack previous # oem_4 is [
# alt + oem_6             : komorebic cycle-stack next # oem_6 is ]

# Resize
alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease

# Manipulate windows
alt + v                 : komorebic toggle-float
alt + shift + z         : komorebic toggle-monocle # Zen mode on a window

# Window manager options
alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause

# Layouts
alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical

# Workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2
alt + 4                 : komorebic focus-workspace 3
alt + 5                 : komorebic focus-workspace 4
alt + 6                 : komorebic focus-workspace 5
alt + 7                 : komorebic focus-workspace 6
alt + 8                 : komorebic focus-workspace 7

# Move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3
alt + shift + 5         : komorebic move-to-workspace 4
alt + shift + 6         : komorebic move-to-workspace 5
alt + shift + 7         : komorebic move-to-workspace 6
alt + shift + 8         : komorebic move-to-workspace 7

# Restart Komorebi
alt + ctrl + shift + r : komorebic stop --bar --whkd; komorebic start --bar --whkd;

Output of komorebic check

bash
KOMOREBI_CONFIG_HOME detected: C:\Users\Adam\.config\komorebi

Looking for configuration files in C:\Users\Adam\.config\komorebi

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\Adam\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag