[BUG]: Switching to a workspace with a floating window keeps the last window of the last workspace focused #524

Closed
opened 2026-01-05 14:51:17 +01:00 by adam · 3 comments
Owner

Originally created by @Cynosphere on GitHub (Nov 20, 2024).

Summary

Switching to a workspace with a floating window keeps the last window of the last workspace focused.
This was not an issue prior to v0.1.30

Version Information

OS Name:                   Microsoft Windows 10 IoT Enterprise LTSC
OS Version:                10.0.19044 N/A Build 19044
komorebic 0.1.30
tag:v0.1.30
commit_hash:9a3dbccc
build_time:2024-11-03 23:49:52 +00:00
build_env:rustc 1.82.0 (f6e511eec 2024-10-15),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.28/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.json",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "mouse_follows_focus": false,
  "default_workspace_padding": 4,
  "default_container_padding": 4,
  "border": false,
  "border_width": 2,
  "border_offset": 0,
  "border_colours": {
    "single": "#287373",
    "stack": "#aabae7",
    "monocle": "#634e75",
    "unfocused": "#171717"
  },
  "border_implementation": "Komorebi",
  "stackbar": {
    "height": 16,
    "label": "Title",
    "mode": "OnStack",
    "tabs": {
      "width": 128,
      "focused_text": "#dedbeb",
      "unfocused_text": "#383838",
      "background": "#171717",
      "font_size": 16,
      "font_family": "Terminus (TTF) for Windows"
    }
  },
  "transparency": false,
  "transparency_alpha": 240,
  "animation": {
    "enabled": true,
    "duration": 150,
    "fps": 144,
    "style": "EaseInOutSine"
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "1",
          "layout": "Grid",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "firefox.exe"
            }
          ]
        },
        {
          "name": "2",
          "layout": "Grid",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "DiscordCanary.exe"
            }
          ]
        },
        {
          "name": "3",
          "layout": "Grid",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "Telegram.exe"
            }
          ]
        },
        {
          "name": "4",
          "layout": "Grid",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "MusicBee.exe"
            }
          ]
        },
        {
          "name": "5",
          "layout": "Grid"
        },
        {
          "name": "6",
          "layout": "Grid"
        },
        {
          "name": "7",
          "layout": "Grid"
        },
        {
          "name": "8",
          "layout": "Grid"
        },
        {
          "name": "9",
          "layout": "Grid",
          "initial_workspace_rules": [
            {
              "kind": "Exe",
              "id": "betterbird.exe"
            }
          ]
        }
      ]
    }
  ]
}

Hotkey Configuration

#Requires AutoHotkey v2.0
#SingleInstance Force

Komorebic(cmd) {
  RunWait(format("komorebic.exe {}", cmd), , "Hide")
}

#!r::{
        Komorebic("reload-configuration")
        Reload()
}
#!q::Komorebic("stop")

#q::Komorebic("close")

#f::Komorebic("toggle-float")
#m::Komorebic("toggle-monocle")

#1::Komorebic("focus-workspace 0")
#2::Komorebic("focus-workspace 1")
#3::Komorebic("focus-workspace 2")
#4::Komorebic("focus-workspace 3")
#5::Komorebic("focus-workspace 4")
#6::Komorebic("focus-workspace 5")
#7::Komorebic("focus-workspace 6")
#8::Komorebic("focus-workspace 7")
#9::Komorebic("focus-workspace 8")

#+1::Komorebic("send-to-workspace 0")
#+2::Komorebic("send-to-workspace 1")
#+3::Komorebic("send-to-workspace 2")
#+4::Komorebic("send-to-workspace 3")
#+5::Komorebic("send-to-workspace 4")
#+6::Komorebic("send-to-workspace 5")
#+7::Komorebic("send-to-workspace 6")
#+8::Komorebic("send-to-workspace 7")
#+9::Komorebic("send-to-workspace 8")

#Up::Komorebic("cycle-focus next")
#Down::Komorebic("cycle-focus previous")
#+Up::Komorebic("cycle-move next")
#+Down::Komorebic("cycle-move previous")

#Left::Komorebic("cycle-stack previous")
#Right::Komorebic("cycle-stack next")
#+Left::Komorebic("unstack")
#+Right::Komorebic("unstack")

#^Up::Komorebic("stack up")
#^Down::Komorebic("stack down")
#^Left::Komorebic("stack left")
#^Right::Komorebic("stack right")


Komorebic("complete-configuration")

Output of komorebic check

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

Looking for configuration files in C:\Users\c

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

No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard
Originally created by @Cynosphere on GitHub (Nov 20, 2024). ### Summary Switching to a workspace with a floating window keeps the last window of the last workspace focused. This was not an issue prior to v0.1.30 ### Version Information ``` OS Name: Microsoft Windows 10 IoT Enterprise LTSC OS Version: 10.0.19044 N/A Build 19044 komorebic 0.1.30 tag:v0.1.30 commit_hash:9a3dbccc build_time:2024-11-03 23:49:52 +00:00 build_env:rustc 1.82.0 (f6e511eec 2024-10-15),stable-x86_64-pc-windows-msvc ``` ### Komorebi Configuration ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.28/schema.json", "app_specific_configuration_path": "$Env:USERPROFILE/applications.json", "window_hiding_behaviour": "Cloak", "cross_monitor_move_behaviour": "Insert", "mouse_follows_focus": false, "default_workspace_padding": 4, "default_container_padding": 4, "border": false, "border_width": 2, "border_offset": 0, "border_colours": { "single": "#287373", "stack": "#aabae7", "monocle": "#634e75", "unfocused": "#171717" }, "border_implementation": "Komorebi", "stackbar": { "height": 16, "label": "Title", "mode": "OnStack", "tabs": { "width": 128, "focused_text": "#dedbeb", "unfocused_text": "#383838", "background": "#171717", "font_size": 16, "font_family": "Terminus (TTF) for Windows" } }, "transparency": false, "transparency_alpha": 240, "animation": { "enabled": true, "duration": 150, "fps": 144, "style": "EaseInOutSine" }, "monitors": [ { "workspaces": [ { "name": "1", "layout": "Grid", "initial_workspace_rules": [ { "kind": "Exe", "id": "firefox.exe" } ] }, { "name": "2", "layout": "Grid", "initial_workspace_rules": [ { "kind": "Exe", "id": "DiscordCanary.exe" } ] }, { "name": "3", "layout": "Grid", "initial_workspace_rules": [ { "kind": "Exe", "id": "Telegram.exe" } ] }, { "name": "4", "layout": "Grid", "initial_workspace_rules": [ { "kind": "Exe", "id": "MusicBee.exe" } ] }, { "name": "5", "layout": "Grid" }, { "name": "6", "layout": "Grid" }, { "name": "7", "layout": "Grid" }, { "name": "8", "layout": "Grid" }, { "name": "9", "layout": "Grid", "initial_workspace_rules": [ { "kind": "Exe", "id": "betterbird.exe" } ] } ] } ] } ``` ### Hotkey Configuration ```ahk #Requires AutoHotkey v2.0 #SingleInstance Force Komorebic(cmd) { RunWait(format("komorebic.exe {}", cmd), , "Hide") } #!r::{ Komorebic("reload-configuration") Reload() } #!q::Komorebic("stop") #q::Komorebic("close") #f::Komorebic("toggle-float") #m::Komorebic("toggle-monocle") #1::Komorebic("focus-workspace 0") #2::Komorebic("focus-workspace 1") #3::Komorebic("focus-workspace 2") #4::Komorebic("focus-workspace 3") #5::Komorebic("focus-workspace 4") #6::Komorebic("focus-workspace 5") #7::Komorebic("focus-workspace 6") #8::Komorebic("focus-workspace 7") #9::Komorebic("focus-workspace 8") #+1::Komorebic("send-to-workspace 0") #+2::Komorebic("send-to-workspace 1") #+3::Komorebic("send-to-workspace 2") #+4::Komorebic("send-to-workspace 3") #+5::Komorebic("send-to-workspace 4") #+6::Komorebic("send-to-workspace 5") #+7::Komorebic("send-to-workspace 6") #+8::Komorebic("send-to-workspace 7") #+9::Komorebic("send-to-workspace 8") #Up::Komorebic("cycle-focus next") #Down::Komorebic("cycle-focus previous") #+Up::Komorebic("cycle-move next") #+Down::Komorebic("cycle-move previous") #Left::Komorebic("cycle-stack previous") #Right::Komorebic("cycle-stack next") #+Left::Komorebic("unstack") #+Right::Komorebic("unstack") #^Up::Komorebic("stack up") #^Down::Komorebic("stack down") #^Left::Komorebic("stack left") #^Right::Komorebic("stack right") Komorebic("complete-configuration") ``` ### Output of komorebic check ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\c Looking for configuration files in C:\Users\c Found komorebi.json; this file can be passed to the start command with the --config flag No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard ```
adam added the bug label 2026-01-05 14:51:17 +01:00
adam closed this issue 2026-01-05 14:51:17 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Nov 20, 2024):

Yep, this was me:

6db317d425 (diff-63b9ef3c0015218cc22dbadfbfd4e631fea784714f05a4c4047af3d99ade667dL235)

@LGUG2Z commented on GitHub (Nov 20, 2024): Yep, this was me: https://github.com/LGUG2Z/komorebi/commit/6db317d425f9a667499a41d24046afce5d8a8bcf#diff-63b9ef3c0015218cc22dbadfbfd4e631fea784714f05a4c4047af3d99ade667dL235
Author
Owner

@LGUG2Z commented on GitHub (Nov 20, 2024):

Fixed on master along with a similar bug which would present if the workspace had a maximized window. This will be in the next nightly and v0.1.31.

@LGUG2Z commented on GitHub (Nov 20, 2024): Fixed on `master` along with a similar bug which would present if the workspace had a maximized window. This will be in the next `nightly` and `v0.1.31`.
Author
Owner

@LGUG2Z commented on GitHub (Nov 20, 2024):

Komorebic("complete-configuration")

Also this is no longer needed since you're using a komorebi.json file 🎉

@LGUG2Z commented on GitHub (Nov 20, 2024): ```ahk Komorebic("complete-configuration") ``` Also this is no longer needed since you're using a `komorebi.json` file 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#524