[BUG]: Komorebi & Komorebi-bar break when you connect or disconnect a monitor #650

Closed
opened 2026-01-05 14:52:12 +01:00 by adam · 2 comments
Owner

Originally created by @Coding-Journey on GitHub (Jul 24, 2025).

Summary

<html> <html><head></head>

Environment

  • Windows 11

  • Komorebi 0.1.37

  • Komorebi bar 0.1.37

  • whkd 0.2.7

  • Commercial licence

How I work
I switch between three set-ups:

  1. Laptop only (travelling or in a meeting)

  2. Two external monitors with the laptop closed (office)

  3. One external monitor plus the laptop screen (home)

What goes wrong
When you hot-plug or unplug a monitor, Komorebi and the bar lose track of the layout. The bar resizes or disappears, windows change size, workspaces don't have any windows on them, windows seem to float randomly. Video example:

https://github.com/user-attachments/assets/25da94d7-14c8-4e36-8556-f97fb8967512

What I expect
Komorebi should detect the new monitor layout and keep my workspaces intact. A short prompt could appear:

You changed your monitor layout. Replicate existing workspaces on the current screen? [Y/n] (10 s)

Typical case:

Office (two monitors) After unplugging (laptop only)
Monitor 1 Laptop screen
I – terminal I – terminal
II – Chrome II – Chrome
III – music III – music
IV – Teams IV – Teams
V – email V – email
Monitor 2 Floating
I – docs docs

I wouldn't mind if it took the "main" monitor's workspaces (the one with the most applications) and replicated that while other applications were floated for me to organise

The issue appears related to #989, but having to restart Komorebi and the bar every time stands out to me as a bug, not a feature

Thanks for looking into it.

</html> </html>

Version Information

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

komorebic 0.1.37
tag:v0.1.37
commit_hash:00384ce3
build_time:2025-05-17 19:16:53 +00:00
build_env:rustc 1.87.0 (17067e9ac 2025-05-09),stable-x86_64-pc-windows-msvc

komorebi-bar 0.1.37

whkd 0.2.7

Komorebi Configuration

Komorebi config:

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/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": true,
  "border_width": 6,
  "border_offset": -1,
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "unfocused_border": "Base03",
    "bar_accent": "Base0D"
  },
  "stackbar": {
    "label": "Title",
    "height": 30,
    "mode": "OnStack",
    "tabs": {
      "width": 200,
      "font_size": 12
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "🐎",
          "layout": "Grid"
        },
        {
          "name": "🌐",
          "layout": "Grid"
        },
        {
          "name": "🎵",
          "layout": "VerticalStack"
        },
        {
          "name": "👥",
          "layout": "RightMainVerticalStack"
        },
        {
          "name": "📧",
          "layout": "Grid"
        },
        {
          "name": "🗄",
          "layout": "Grid"
        },
        {
          "name": "📝",
          "layout": "Grid"
        },
        {
          "name": "💻",
          "layout": "RightMainVerticalStack",
          "layout_flip": "Horizontal"
        },
        {
          "name": "🐙",
          "layout": "RightMainVerticalStack",
        },
        {
          "name": "🗑",
          "layout": "Grid"
        }
      ]
    },
    {
      "workspaces": [
        {
          "name": "🐎",
          "layout": "Grid"
        },
        {
          "name": "🌐",
          "layout": "Grid"
        },
        {
          "name": "🎵",
          "layout": "VerticalStack"
        },
        {
          "name": "👥",
          "layout": "RightMainVerticalStack"
        },
        {
          "name": "📧",
          "layout": "Grid"
        },
        {
          "name": "🗄",
          "layout": "Grid"
        },
        {
          "name": "📝",
          "layout": "Grid"
        },
        {
          "name": "💻",
          "layout": "RightMainVerticalStack",
          "layout_flip": "Horizontal"
        },
        {
          "name": "🐙",
          "layout": "RightMainVerticalStack",
        },
        {
          "name": "🗑",
          "layout": "Grid"
        }
      ]
    },
  ],
  "bar_configurations": [
      "C:/Users/redacted/komorebi.bar1.json",
      "C:/Users/redacted/komorebi.bar2.json",
    ]
}



Bar config (both files are the same except monitor: 0/1):

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.bar.json",
  "monitor": 0,
  "height": 40,
  "icon_scale": 0.8,
  "font_family": "CaskaydiaCove Nerd Font Mono",
  "font_size": 12.5,
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "accent": "Base0D"
  },
  "grouping": {
     "kind": "Widget",
     "rounding": 10
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": false
        },
        "layout": {
          "enable": true
        },
        "focused_window": {
          "enable": false,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Update": {
        "enable": true
      }
    },
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": false
      }
    },
    {
      "Memory": {
        "enable": false
      }
    },
    {
      "Network": {
        "enable": false,
        "show_total_data_transmitted": false,
        "show_network_activity": false
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": true,
        "hide_on_full_charge": true
      }
    }
  ],
    "transparency_alpha": 0
}

Hotkey Configuration

.shell powershell

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 # if shell is pwsh / powershell
alt + shift + o : komorebic reload-configuration

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

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

Output of komorebic check

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\redacted

Looking for configuration files in C:\Users\redacted

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

Originally created by @Coding-Journey on GitHub (Jul 24, 2025). ### Summary <html> <body> <!--StartFragment--><html><head></head><body><p><strong>Environment</strong></p> <ul> <li> <p>Windows 11</p> </li> <li> <p>Komorebi 0.1.37</p> </li> <li> <p>Komorebi bar 0.1.37</p> </li> <li> <p>whkd 0.2.7</p> </li> <li> <p>Commercial licence</p> </li> </ul> <p><strong>How I work</strong><br> I switch between three set-ups:</p> <ol> <li> <p>Laptop only (travelling or in a meeting)</p> </li> <li> <p>Two external monitors with the laptop closed (office)</p> </li> <li> <p>One external monitor plus the laptop screen (home)</p> </li> </ol> <p><strong>What goes wrong</strong><br> When you hot-plug or unplug a monitor, Komorebi and the bar lose track of the layout. The bar resizes or disappears, windows change size, workspaces don't have any windows on them, windows seem to float randomly. Video example: https://github.com/user-attachments/assets/25da94d7-14c8-4e36-8556-f97fb8967512 <p><strong>What I expect</strong><br> Komorebi should detect the new monitor layout and keep my workspaces intact. A short prompt could appear:</p> <blockquote> <p><em>You changed your monitor layout. Replicate existing workspaces on the current screen? [Y/n] (10 s)</em></p> </blockquote> <p>Typical case:</p> Office (two monitors) | After unplugging (laptop only) -- | -- Monitor 1 | Laptop screen I – terminal | I – terminal II – Chrome | II – Chrome III – music | III – music IV – Teams | IV – Teams V – email | V – email Monitor 2 | Floating I – docs | docs <p>I wouldn't mind if it took the "main" monitor's workspaces (the one with the most applications) and replicated that while other applications were floated for me to organise</p <p>The issue appears related to #989, but having to restart Komorebi and the bar every time stands out to me as a bug, not a feature</p> <p>Thanks for looking into it.</p></body></html><!--EndFragment--> </body> </html> ### Version Information OS Name: Microsoft Windows 11 Enterprise OS Version: 10.0.26100 N/A Build 26100 komorebic 0.1.37 tag:v0.1.37 commit_hash:00384ce3 build_time:2025-05-17 19:16:53 +00:00 build_env:rustc 1.87.0 (17067e9ac 2025-05-09),stable-x86_64-pc-windows-msvc komorebi-bar 0.1.37 whkd 0.2.7 ### Komorebi Configuration ```json Komorebi config: { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/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": true, "border_width": 6, "border_offset": -1, "theme": { "palette": "Base16", "name": "Ashes", "unfocused_border": "Base03", "bar_accent": "Base0D" }, "stackbar": { "label": "Title", "height": 30, "mode": "OnStack", "tabs": { "width": 200, "font_size": 12 } }, "monitors": [ { "workspaces": [ { "name": "🐎", "layout": "Grid" }, { "name": "🌐", "layout": "Grid" }, { "name": "🎵", "layout": "VerticalStack" }, { "name": "👥", "layout": "RightMainVerticalStack" }, { "name": "📧", "layout": "Grid" }, { "name": "🗄", "layout": "Grid" }, { "name": "📝", "layout": "Grid" }, { "name": "💻", "layout": "RightMainVerticalStack", "layout_flip": "Horizontal" }, { "name": "🐙", "layout": "RightMainVerticalStack", }, { "name": "🗑", "layout": "Grid" } ] }, { "workspaces": [ { "name": "🐎", "layout": "Grid" }, { "name": "🌐", "layout": "Grid" }, { "name": "🎵", "layout": "VerticalStack" }, { "name": "👥", "layout": "RightMainVerticalStack" }, { "name": "📧", "layout": "Grid" }, { "name": "🗄", "layout": "Grid" }, { "name": "📝", "layout": "Grid" }, { "name": "💻", "layout": "RightMainVerticalStack", "layout_flip": "Horizontal" }, { "name": "🐙", "layout": "RightMainVerticalStack", }, { "name": "🗑", "layout": "Grid" } ] }, ], "bar_configurations": [ "C:/Users/redacted/komorebi.bar1.json", "C:/Users/redacted/komorebi.bar2.json", ] } Bar config (both files are the same except monitor: 0/1): { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.bar.json", "monitor": 0, "height": 40, "icon_scale": 0.8, "font_family": "CaskaydiaCove Nerd Font Mono", "font_size": 12.5, "theme": { "palette": "Base16", "name": "Ashes", "accent": "Base0D" }, "grouping": { "kind": "Widget", "rounding": 10 }, "left_widgets": [ { "Komorebi": { "workspaces": { "enable": true, "hide_empty_workspaces": false }, "layout": { "enable": true }, "focused_window": { "enable": false, "show_icon": true } } } ], "right_widgets": [ { "Update": { "enable": true } }, { "Media": { "enable": true } }, { "Storage": { "enable": false } }, { "Memory": { "enable": false } }, { "Network": { "enable": false, "show_total_data_transmitted": false, "show_network_activity": false } }, { "Date": { "enable": true, "format": "DayDateMonthYear" } }, { "Time": { "enable": true, "format": "TwentyFourHour" } }, { "Battery": { "enable": true, "hide_on_full_charge": true } } ], "transparency_alpha": 0 } ``` ### Hotkey Configuration .shell powershell # 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 # if shell is pwsh / powershell alt + shift + o : komorebic reload-configuration # 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 + 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_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 + 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 alt + 0 : komorebic focus-workspace 9 # 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 alt + shift + 0 : komorebic move-to-workspace 9 ### Output of komorebic check No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\redacted Looking for configuration files in C:\Users\redacted 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
adam added the bug label 2026-01-05 14:52:12 +01:00
adam closed this issue 2026-01-05 14:52:12 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Jul 24, 2025):

Covered extensively in the docs: https://lgug2z.github.io/komorebi/common-workflows/multi-monitor-setup.html?h=multi

@LGUG2Z commented on GitHub (Jul 24, 2025): Covered extensively in the docs: https://lgug2z.github.io/komorebi/common-workflows/multi-monitor-setup.html?h=multi
Author
Owner

@Coding-Journey commented on GitHub (Jul 24, 2025):

Ah, my apologies - that's great it's already supported, thanks for pointing me in the right direction!

@Coding-Journey commented on GitHub (Jul 24, 2025): Ah, my apologies - that's great it's already supported, thanks for pointing me in the right direction!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#650