komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

[BUG]: Cmder will not enter into layout

Open Thaddeus-Maximus opened this issue 2 months ago • 9 comments

Summary

Just installed Komorebi. Working great other than this - cmder won't enter into the layout. Komorebi doesn't even seem to notice that the window has focus. See attached screenshot.

Image

Version Information

λ systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version" OS Name: Microsoft Windows 10 Pro OS Version: 10.0.19045 N/A Build 19045

λ komorebic --version komorebic 0.1.38 tag:v0.1.38 commit_hash:ffa76ea2 build_time:2025-09-13 18:40:25 +00:00 build_env:rustc 1.89.0 (29483883e 2025-08-04),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.38/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.json",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 3,
  "default_container_padding": 3,
  "border": false,
  "border_width": 8,
  "border_offset": -1,
  "theme": {
    "palette": "Base16",
    "name": "GruvboxDarkSoft",
    "unfocused_border": "Base03",
    "bar_accent": "Base0C"
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "1",
          "layout": "VerticalStack"
        },
        {
          "name": "2",
          "layout": "VerticalStack"
        },
        {
          "name": "3",
          "layout": "VerticalStack"
        },
        {
          "name": "4",
          "layout": "VerticalStack"
        },
        {
          "name": "5",
          "layout": "VerticalStack"
        },
        {
          "name": "6",
          "layout": "VerticalStack"
        },
        {
          "name": "7",
          "layout": "VerticalStack"
        },
        {
          "name": "8",
          "layout": "VerticalStack"
        },
        {
          "name": "9",
          "layout": "VerticalStack"
        }
      ]
    }
  ]
}

Hotkey Configuration

.shell powershell

Reload whkd configuration

alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd

alt + q : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell alt + shift + 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 + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ #alt + shift + 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 + 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 + l : komorebic resize-axis horizontal increase alt + h : 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 + t : komorebic toggle-float alt + shift + f : komorebic toggle-monocle

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 alt + 9 : komorebic focus-workspace 8

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 alt + shift + 9 : komorebic move-to-workspace 8

Output of komorebic check

λ komorebic check No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Thad

Looking for configuration files in C:\Users\Thad

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

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

Thaddeus-Maximus avatar Nov 07 '25 05:11 Thaddeus-Maximus

FWIW - same with SOLIDWORKS

Image

Thaddeus-Maximus avatar Nov 07 '25 05:11 Thaddeus-Maximus

As suggested in another issue, I tried running komorebi as admin - same behavior. Happy to try anything as far as custom configs or rules, could just use some pointing in the right direction.

Thaddeus-Maximus avatar Nov 07 '25 05:11 Thaddeus-Maximus

I am just guessing, but I know that some apps will not get managed if they are transparent (some discord client). What happens if you turn off transparency for cmder?

You can also check if the app is un-managed on purpose by using the komorebi-gui command and in the app you can see details under the Debugging option. Some apps just don't behave nicely when being managed, like Microsoft Teams.

CtByte avatar Nov 07 '25 09:11 CtByte

For cmder:

{
  "should_manage": false,
  "is_window": true,
  "has_minimum_width": true,
  "has_minimum_height": true,
  "has_title": true,
  "is_cloaked": false,
  "allow_cloaked": false,
  "allow_layered_transparency": false,
  "window_style": "BORDER | CAPTION | CLIPCHILDREN | CLIPSIBLINGS | GROUP | MAXIMIZEBOX | OVERLAPPEDWINDOW | VISIBLE",
  "extended_window_style": "APPWINDOW | LAYERED | WINDOWEDGE",
  "title": "Cmder",
  "exe_name": "ConEmu64.exe",
  "class": "VirtualConsoleClass",
  "path": "C:\\Program Files\\cmder\\vendor\\conemu-maximus5\\ConEmu64.exe",
  "matches_permaignore_class": null,
  "matches_ignore_identifier": null,
  "matches_managed_override": null,
  "matches_layered_whitelist": null,
  "matches_floating_applications": null,
  "matches_wsl2_gui": null,
  "matches_no_titlebar": null
}

For SOLIDWORKS:

{
  "should_manage": false,
  "is_window": true,
  "has_minimum_width": true,
  "has_minimum_height": true,
  "has_title": true,
  "is_cloaked": false,
  "allow_cloaked": false,
  "allow_layered_transparency": false,
  "window_style": "BORDER | CLIPSIBLINGS | GROUP | MAXIMIZEBOX | SIZEBOX | SYSMENU | VISIBLE",
  "extended_window_style": "ACCEPTFILES | WINDOWEDGE",
  "title": "SOLIDWORKS 2025 SP3.0",
  "exe_name": "SLDWORKS.exe",
  "class": "Afx:0000000140000000:8:0000000000010003:0000000000000000:0000000000940701",
  "path": "C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS\\SLDWORKS.exe",
  "matches_permaignore_class": null,
  "matches_ignore_identifier": null,
  "matches_managed_override": null,
  "matches_layered_whitelist": null,
  "matches_floating_applications": null,
  "matches_wsl2_gui": null,
  "matches_no_titlebar": null
}

Thaddeus-Maximus avatar Nov 07 '25 13:11 Thaddeus-Maximus

Turning off transparency does fix cmder! The new output is this for cmder:

{
  "should_manage": true,
  "is_window": true,
  "has_minimum_width": true,
  "has_minimum_height": true,
  "has_title": true,
  "is_cloaked": false,
  "allow_cloaked": false,
  "allow_layered_transparency": false,
  "window_style": "BORDER | CAPTION | CLIPCHILDREN | CLIPSIBLINGS | GROUP | MAXIMIZEBOX | OVERLAPPEDWINDOW | VISIBLE",
  "extended_window_style": "APPWINDOW | WINDOWEDGE",
  "title": "Cmder",
  "exe_name": "ConEmu64.exe",
  "class": "VirtualConsoleClass",
  "path": "C:\\Program Files\\cmder\\vendor\\conemu-maximus5\\ConEmu64.exe",
  "matches_permaignore_class": null,
  "matches_ignore_identifier": null,
  "matches_managed_override": null,
  "matches_layered_whitelist": null,
  "matches_floating_applications": null,
  "matches_wsl2_gui": null,
  "matches_no_titlebar": null
}

There isn't such an option for SOLIDWORKS. That's an opaque app.

Thaddeus-Maximus avatar Nov 07 '25 13:11 Thaddeus-Maximus

some apps need to be managed by telling Komorebi just that

perhaps that will work for solidworks, but again, be aware that not all apps behave nicely when managed, especially if they have a complex ui.

CtByte avatar Nov 07 '25 14:11 CtByte

Got it, we're managing now - but very buggy, as it technically is window-in-window, and sometimes opens additional dialogs. See the red circle here:

Image

Do you have any good tips or places to start on doing more complex management?

Thaddeus-Maximus avatar Nov 07 '25 16:11 Thaddeus-Maximus

you can use ignore or floating rules such as this (perhaps composite rules would make the most sense)

    [
      {
        "kind": "Exe",
        "id": "msedgewebview2.exe",
        "matching_startegy": "Equals"
      },
      {
        "kind": "Title",
        "id": "Untitled",
        "matching_strategy": "Equals"
      }
    ],

you can use the komorebic visible-windows command to see what is being managed and come up with the rules. This might also be helpful

you can look at my config for inspiration if you want (even thought it might look a bit messy 🙂 )

CtByte avatar Nov 07 '25 17:11 CtByte

also if you come up with something you are happy with, perhaps you could consider to make a PR on this project so your solution could help others too 🙂

CtByte avatar Nov 07 '25 17:11 CtByte