Skip to content

[BUG]: Can't ignore some of the Unreal Engine windows. #1106

Description

@daltongd

Summary

When configuring the ignore rules in komorebi, I came across an issue which prevents me from excluding some Unreal Engine windows that I would prefer to work as pop ups unmanaged by komorebi.

I've tried a few things and it seems it is relevant only to some types of Unreal Engine windows. The class for each of them is simply UnrealWindow.

In this example I wasn't able to set up the rules for the Open Asset window. The other one (New Level) is a dialogue window that prevent any interaction with the main window. The rule for this one worked ok.
image
I had success setting the rules also for other windows that act as a sort of in-editor dialog for creating new C++ classes - this one however allowed me to interact with the windows underneath.

komorebic visible-windows output for the relevant monitor before the rules were applied:

{
  "GBT2702-5&7fefdab&0&UID4352": [
    {
      "title": "RandomTestProject - Unreal Editor",
      "exe": "UnrealEditor.exe",
      "class": "UnrealWindow"
    },
    {
      "title": "Open Asset",
      "exe": "UnrealEditor.exe",
      "class": "UnrealWindow"
    },
    {
      "title": "New Level",
      "exe": "UnrealEditor.exe",
      "class": "UnrealWindow"
    }
  ],
  ...
}

Ignore rules - the Open Asset doesn't work, New Level's behavior is as expected:

  ...
  "UnrealEditor": {
    "ignore": [
      {
        "kind": "Title",
        "id": "Open Asset",
        "matching_strategy": "Equals"
      },
      {
        "kind": "Title",
        "id": "New Level",
        "matching_strategy": "Equals"
      }
    ]
  },
  ...

I noticed that when the ignore rule is present, the Open Asset window can be moved around, but it will still take up its space, and whenever I click on the main editor window it jumps back into its position. This doesn't happen when there is no rule - in such case the window is correctly managed by komorebi.

I did some digging and found base engine classes those windows are created with, it doesn't seem to help much:
New Level -> SWindow (rule works)
Open Asset -> SDockTab (rule doesn't work)

Both SWindow and SDockTab derive from SCompoundWidget which is a base for most Unreal's editor widgets.
Open Asset seems to have only a single 'flag' set and it's TabRole being set to NomadTab. The windows I had success ignoring seem to be meant as dialogs.

I can ignore all the windows when I exclude the whole UnrealWindow class, but this means komorebi doesn't manage any editor window including the main one.
Like this:

  "UnrealEditor": {
    "ignore": [
      {
        "kind": "Class",
        "id": "UnrealWindow",
        "matching_strategy": "Equals"
      }
    ]
  },

I thought that maybe there is a chance a composite rule could help here, but no luck. This is what I tried:

  "UnrealEditor": {
    "ignore": [
      [
        {
          "kind": "Class",
          "id": "UnrealWindow",
          "matching_strategy": "Equals"
        },
        {
          "kind": "Title",
          "id": "Open Asset",
          "matching_strategy": "Equals"
        }
      ]
    ]
  },

This one also didn't work:

  "UnrealEditor": {
    "ignore": [
      [
        {
          "kind": "Class",
          "id": "UnrealWindow",
          "matching_strategy": "Equals"
        },
        {
          "kind": "Title",
          "id": "- Unreal Editor",
          "matching_strategy": "DoesNotEndWith"
        }
      ]
    ]
  },

I tried my best going as deep with the research as I thought it made sense, but I'm more than happy to both dig deeper into Unreal's source, as well as try applying some solutions in the komorebi codebase, so that no maintainer has to install and learn to navigate Unreal. I'll be thankful for any pointers or ideas, as well as patches to test in my setup. Happy to try things I might not have thought of as well!

Version Information

❯ systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631
❯ komorebic --version
komorebic 0.1.31
tag:nightly
commit_hash:36e3eaad
build_time:2024-11-06 12:32:35 +01:00
build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),stable-x86_64-pc-windows-msvc

this was true also on the version from winget I installed earlier

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.29/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/.config/komorebi/applications.json",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 4,
  "default_container_padding": 4,
  "border": false,
  "border_width": 3,
  "border_offset": -1,
  "border_style": "System",
  "border_z_order": "Bottom",
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "unfocused_border": "Base03",
    "bar_accent": "Base0D"
  },
  "stackbar": {
    "height": 15,
    "mode": "OnStack",
    "tabs": {
      "width": 150
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "Main",
          "layout": "BSP"
        },
        {
          "name": "Secondary",
          "layout": "BSP"
        },
        {
          "name": "Tertiary",
          "layout": "BSP"
        },
        {
          "name": "Quaternary",
          "layout": "BSP"
        },
        {
          "name": "Misc",
          "layout": "BSP"
        },
        {
          "name": "Grid",
          "layout": "Grid"
        }
      ]
    },
    {
      "workspaces": [
        {
          "name": "L Main",
          "layout": "BSP"
        },
        {
          "name": "Comms",
          "layout": "UltrawideVerticalStack",
          "workspace_rules": [
            {
              "kind": "Title",
              "id": "Messenger",
              "matching_strategy": "Equals"
            },
            {
              "kind": "Exe",
              "id": "Discord.exe",
              "matching_strategy": "Equals"
            },
            {
              "kind": "Exe",
              "id": "slack.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "Media",
          "layout": "BSP",
          "workspace_rules": [
            {
              "kind": "Exe",
              "id": "Spotify.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "Misc I",
          "layout": "BSP"
        },
        {
          "name": "Misc II",
          "layout": "BSP"
        }
      ]
    },
    {
      "workspaces": [
        {
          "name": "R Main",
          "layout": "BSP"
        },
        {
          "name": "\udb85\udfa0 Obsidian",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "Obsidian.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "\udb80\udd69 Source",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "rider64.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "\udb81\ude2c Plastic",
          "layout": "RightMainVerticalStack",
          "workspace_rules": [
            {
              "kind": "Exe",
              "id": "plastic.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "\udb82\uddb1 Unreal",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "UnrealEditor.exe",
              "matching_strategy": "Equals"
            }
          ]
        },
        {
          "name": "Misc I",
          "layout": "BSP"
        },
        {
          "name": "Misc II",
          "layout": "BSP"
        },
        {
          "name": "Floating"
        }
      ]
    }
  ]
}

Hotkey Configuration

.shell powershell

# list of keys
# https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

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

# 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('Brave') -eq $False) { start brave }

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

# Focus windows
alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : 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 + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : 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_period        : komorebic cycle-stack previous
alt + oem_2             : komorebic cycle-stack next # oem_2 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 + 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

# 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

Output of komorebic check

KOMOREBI_CONFIG_HOME detected: C:\Users\[REDACTED]\.config\komorebi

Looking for configuration files in C:\Users\[REDACTED]\.config\komorebi

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions