[BUG]: foreground_lock_timeout #488

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

Originally created by @rwijtvliet on GitHub (Oct 14, 2024).

Summary

Since about a week komorebi is not working on my system. I didn't (conciously) change anything. Here is the output of komorebic start:

❯ komorebic start
Start-Process 'komorebi.exe' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Start-Process 'komorebi.exe' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Start-Process 'komorebi.exe' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Running komorebi.exe directly for detailed error output

Error:
   0: .[0].float_identifiers: data did not match any variant of untagged enum MatchingRule at line 7 column 5

Location:
   komorebi\src\core\config_generation.rs:132

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

and from komorebi directly, which is a little bit different:

❯ komorebi
2024-10-14T07:40:52.780521Z  INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-10-14T07:40:52.784949Z  INFO komorebi: creating window manager from static configuration file: C:\Users\rudi\komorebi.json
2024-10-14T07:40:52.786949Z  INFO komorebi::border_manager: purging known borders: []
Error:
   0: .[0].float_identifiers: data did not match any variant of untagged enum MatchingRule at line 7 column 5

Location:
   komorebi\src\core\config_generation.rs:132

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

Let me know if there is anything I can do to help debugging!

Version Information

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19045 N/A Build 19045
komorebi 0.1.29
tag:v0.1.29
commit_hash:818ac340
build_time:2024-09-28 01:48:31 +00:00
build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),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.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 6,
  "default_container_padding": 10,
  "border": true,
  "border_width": 8,
  "border_offset": -1,
  "border_colours": {
    "single": "#f2c545",
    "stack": "#00a542",
    "monocle": "#ff3399",
    "unfocused": "#808080"
  },
  "global_work_area_offset": { "top": 0, "right": 0, "bottom": 28, "left": 0 },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300,
      "focused_text": "#00a542",
      "unfocused_text": "#b3b3b3",
      "background": "#141414"
    }
  },
  "mouse_follows_focus": false,
  "float_rules": [
    {
      "kind": "Exe",
      "id": "Zebar.exe",
      "matching_strategy": "Equals"
    }
  ],
  "monitors": [
    {
      "workspaces": [
        {
          "name": "1file",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "exe",
              "id": "explorer.exe"
            }
          ]
        },
        {
          "name": "2www",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "exe",
              "id": "msedge.exe"
            }
          ]
        },
        {
          "name": "3office",
          "layout": "BSP"
        },
        {
          "name": "4term",
          "layout": "BSP"
        },
        {
          "name": "5code",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "exe",
              "id": "code.exe"
            }
          ]
        },
        {
          "name": "6xtra",
          "layout": "BSP"
        },
        {
          "name": "7chat",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "exe",
              "id": "ms-teams.exe"
            }
          ]
        },
        {
          "name": "8email",
          "layout": "BSP",
          "initial_workspace_rules": [
            {
              "kind": "exe",
              "id": "OUTLOOK.EXE"
            }
          ]
        },
        {
          "name": "9media",
          "layout": "BSP",
          "initial_workspace_rules": [{ "kind": "exe", "id": "ONENOTE.EXE" }]
        }
      ]
    }
  ]
}

Hotkey Configuration

#Requires AutoHotkey v2.0
#SingleInstance Force

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


; hotkey = win + alt = #!
; additional hotkey = win + alt + shift = #!+


; #########
; # Focus #
; #########
;
; # window
; # hotkey + htns
#!h::Komorebic("focus left")
#!t::Komorebic("focus up")
#!n::Komorebic("focus down")
#!s::Komorebic("focus right")
;
; # workspace
; # hotkey + 1..9
#!1::Komorebic("focus-named-workspace 1file")
#!2::Komorebic("focus-named-workspace 2www")
#!3::Komorebic("focus-named-workspace 3office")
#!4::Komorebic("focus-named-workspace 4term")
#!5::Komorebic("focus-named-workspace 5code")
#!6::Komorebic("focus-named-workspace 6xtra")
#!7::Komorebic("focus-named-workspace 7chat")
#!8::Komorebic("focus-named-workspace 8email")
#!9::Komorebic("focus-named-workspace 9media")
;
; # monitor
; # hotkey + gcrl
#!g::Komorebic("focus-monitor left")
;
; ########
; # Move #
; ########
;
; # window/container inside workspace
; # hotkey + shift + htns
#!+h::Komorebic("move left")
#!+t::Komorebic("move up")
#!+n::Komorebic("move down")
#!+s::Komorebic("move right")
;
; # window/container to workspace
; # hotkey + shift + 1..9
#!+1::Komorebic("move-to-named-workspace 1file")
#!+2::Komorebic("move-to-named-workspace 2www")
#!+3::Komorebic("move-to-named-workspace 3office")
#!+4::Komorebic("move-to-named-workspace 4term")
#!+5::Komorebic("move-to-named-workspace 5code")
#!+6::Komorebic("move-to-named-workspace 6xtra")
#!+7::Komorebic("move-to-named-workspace 7chat")
#!+8::Komorebic("move-to-named-workspace 8email")
#!+9::Komorebic("move-to-named-workspace 9media")
;
; # workspace to monitor
; # hotkey + shift + gcl
#!+g::Komorebic("move-workspace-to-monitor")
;
; #########
; # Close #
; #########
;
; # hotkey + w
#!w::Komorebic("close")
;
; ########
; # Size #
; ########
;
; # width
; # hotkey + left/right, hotkey + []
#!Right::
#!]::Komorebic("resize-axis horizontal increase")
#!Left::
#![::Komorebic("resize-axis horizontal decrease")
; # height
; # hotkey + up/down, hotkey + {}
#!Up::
#!+]::Komorebic("resize-axis vertical increase")
#!Down::
#!+[::Komorebic("resize-axis vertical decrease")
; # balance
; # hotkey + =
;
; ##########
; # Layout #
; ##########
;
; # toggle float/tiling
; # hotkey + b
#!b::Komorebic("toggle-float")
;
; # toggle maximize
; # hotkey + m
#!m::Komorebic("toggle-maximize")
;
; # where to position next window
; # hotkey + v
;
; ##################
; # Window manager #
; ##################
;
; # restart
; # hotkey + f3
#!F3::{
  MsgBox("Restarting komorebi")
  Komorebic("stop")
  Komorebic("start")
  Komorebic("retile")
  Reload
}
; # exit
; # hotkey + f4
#!F4::{
  MsgBox("Stopping komorebi") 
  Komorebic("stop")
}
;
; ########
; # Apps #
; ########
;
; # cycle apps
; # TODO: do
; # launch apps
; # TODO: do
;
; # terminal
; # hotkey + (shift +) enter
#!Enter::Run("WezTerm",,"Hide")
;
; # screenshot
; # . to clipboard
; # hotkey + y
#!y::Run "snippingtool"
; # . to editor
; # TODO:
;
; # various other apps under new namespace
; # hotkey + p
;
; ###################################
; # Non-window-management shortcuts #
; ###################################
;
; # lock the machine
; # hotkey + f5
#!F5::DllCall("LockWorkStation")

Output of komorebic check

❯ komorebic check
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\rudi

Looking for configuration files in C:\Users\rudi

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

Found C:\Users\rudi\.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 @rwijtvliet on GitHub (Oct 14, 2024). ### Summary Since about a week komorebi is not working on my system. I didn't (conciously) change anything. Here is the output of `komorebic start`: ```bash ❯ komorebic start Start-Process 'komorebi.exe' -WindowStyle hidden Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Start-Process 'komorebi.exe' -WindowStyle hidden Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Start-Process 'komorebi.exe' -WindowStyle hidden Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Running komorebi.exe directly for detailed error output Error: 0: .[0].float_identifiers: data did not match any variant of untagged enum MatchingRule at line 7 column 5 Location: komorebi\src\core\config_generation.rs:132 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: BaseThreadInitThunk<unknown> at <unknown source file>:<unknown line> 2: RtlUserThreadStart<unknown> at <unknown source file>:<unknown line> Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. Run with RUST_BACKTRACE=full to include source snippets. ``` and from `komorebi` directly, which is a little bit different: ```bash ❯ komorebi 2024-10-14T07:40:52.780521Z INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0 2024-10-14T07:40:52.784949Z INFO komorebi: creating window manager from static configuration file: C:\Users\rudi\komorebi.json 2024-10-14T07:40:52.786949Z INFO komorebi::border_manager: purging known borders: [] Error: 0: .[0].float_identifiers: data did not match any variant of untagged enum MatchingRule at line 7 column 5 Location: komorebi\src\core\config_generation.rs:132 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: BaseThreadInitThunk<unknown> at <unknown source file>:<unknown line> 2: RtlUserThreadStart<unknown> at <unknown source file>:<unknown line> Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. Run with RUST_BACKTRACE=full to include source snippets. ``` Let me know if there is anything I can do to help debugging! ### Version Information ```powershell OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.19045 N/A Build 19045 ``` ```bash komorebi 0.1.29 tag:v0.1.29 commit_hash:818ac340 build_time:2024-09-28 01:48:31 +00:00 build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),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.yaml", "window_hiding_behaviour": "Cloak", "cross_monitor_move_behaviour": "Insert", "default_workspace_padding": 6, "default_container_padding": 10, "border": true, "border_width": 8, "border_offset": -1, "border_colours": { "single": "#f2c545", "stack": "#00a542", "monocle": "#ff3399", "unfocused": "#808080" }, "global_work_area_offset": { "top": 0, "right": 0, "bottom": 28, "left": 0 }, "stackbar": { "height": 40, "mode": "OnStack", "tabs": { "width": 300, "focused_text": "#00a542", "unfocused_text": "#b3b3b3", "background": "#141414" } }, "mouse_follows_focus": false, "float_rules": [ { "kind": "Exe", "id": "Zebar.exe", "matching_strategy": "Equals" } ], "monitors": [ { "workspaces": [ { "name": "1file", "layout": "BSP", "initial_workspace_rules": [ { "kind": "exe", "id": "explorer.exe" } ] }, { "name": "2www", "layout": "BSP", "initial_workspace_rules": [ { "kind": "exe", "id": "msedge.exe" } ] }, { "name": "3office", "layout": "BSP" }, { "name": "4term", "layout": "BSP" }, { "name": "5code", "layout": "BSP", "initial_workspace_rules": [ { "kind": "exe", "id": "code.exe" } ] }, { "name": "6xtra", "layout": "BSP" }, { "name": "7chat", "layout": "BSP", "initial_workspace_rules": [ { "kind": "exe", "id": "ms-teams.exe" } ] }, { "name": "8email", "layout": "BSP", "initial_workspace_rules": [ { "kind": "exe", "id": "OUTLOOK.EXE" } ] }, { "name": "9media", "layout": "BSP", "initial_workspace_rules": [{ "kind": "exe", "id": "ONENOTE.EXE" }] } ] } ] } ``` ### Hotkey Configuration ```bash #Requires AutoHotkey v2.0 #SingleInstance Force Komorebic(cmd) { RunWait(format("komorebic.exe {}", cmd), , "Hide") } ; hotkey = win + alt = #! ; additional hotkey = win + alt + shift = #!+ ; ######### ; # Focus # ; ######### ; ; # window ; # hotkey + htns #!h::Komorebic("focus left") #!t::Komorebic("focus up") #!n::Komorebic("focus down") #!s::Komorebic("focus right") ; ; # workspace ; # hotkey + 1..9 #!1::Komorebic("focus-named-workspace 1file") #!2::Komorebic("focus-named-workspace 2www") #!3::Komorebic("focus-named-workspace 3office") #!4::Komorebic("focus-named-workspace 4term") #!5::Komorebic("focus-named-workspace 5code") #!6::Komorebic("focus-named-workspace 6xtra") #!7::Komorebic("focus-named-workspace 7chat") #!8::Komorebic("focus-named-workspace 8email") #!9::Komorebic("focus-named-workspace 9media") ; ; # monitor ; # hotkey + gcrl #!g::Komorebic("focus-monitor left") ; ; ######## ; # Move # ; ######## ; ; # window/container inside workspace ; # hotkey + shift + htns #!+h::Komorebic("move left") #!+t::Komorebic("move up") #!+n::Komorebic("move down") #!+s::Komorebic("move right") ; ; # window/container to workspace ; # hotkey + shift + 1..9 #!+1::Komorebic("move-to-named-workspace 1file") #!+2::Komorebic("move-to-named-workspace 2www") #!+3::Komorebic("move-to-named-workspace 3office") #!+4::Komorebic("move-to-named-workspace 4term") #!+5::Komorebic("move-to-named-workspace 5code") #!+6::Komorebic("move-to-named-workspace 6xtra") #!+7::Komorebic("move-to-named-workspace 7chat") #!+8::Komorebic("move-to-named-workspace 8email") #!+9::Komorebic("move-to-named-workspace 9media") ; ; # workspace to monitor ; # hotkey + shift + gcl #!+g::Komorebic("move-workspace-to-monitor") ; ; ######### ; # Close # ; ######### ; ; # hotkey + w #!w::Komorebic("close") ; ; ######## ; # Size # ; ######## ; ; # width ; # hotkey + left/right, hotkey + [] #!Right:: #!]::Komorebic("resize-axis horizontal increase") #!Left:: #![::Komorebic("resize-axis horizontal decrease") ; # height ; # hotkey + up/down, hotkey + {} #!Up:: #!+]::Komorebic("resize-axis vertical increase") #!Down:: #!+[::Komorebic("resize-axis vertical decrease") ; # balance ; # hotkey + = ; ; ########## ; # Layout # ; ########## ; ; # toggle float/tiling ; # hotkey + b #!b::Komorebic("toggle-float") ; ; # toggle maximize ; # hotkey + m #!m::Komorebic("toggle-maximize") ; ; # where to position next window ; # hotkey + v ; ; ################## ; # Window manager # ; ################## ; ; # restart ; # hotkey + f3 #!F3::{ MsgBox("Restarting komorebi") Komorebic("stop") Komorebic("start") Komorebic("retile") Reload } ; # exit ; # hotkey + f4 #!F4::{ MsgBox("Stopping komorebi") Komorebic("stop") } ; ; ######## ; # Apps # ; ######## ; ; # cycle apps ; # TODO: do ; # launch apps ; # TODO: do ; ; # terminal ; # hotkey + (shift +) enter #!Enter::Run("WezTerm",,"Hide") ; ; # screenshot ; # . to clipboard ; # hotkey + y #!y::Run "snippingtool" ; # . to editor ; # TODO: ; ; # various other apps under new namespace ; # hotkey + p ; ; ################################### ; # Non-window-management shortcuts # ; ################################### ; ; # lock the machine ; # hotkey + f5 #!F5::DllCall("LockWorkStation") ``` ### Output of komorebic check ```bash ❯ komorebic check No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\rudi Looking for configuration files in C:\Users\rudi Found komorebi.json; this file can be passed to the start command with the --config flag Found C:\Users\rudi\.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:51:03 +01:00
adam closed this issue 2026-01-05 14:51:03 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Oct 14, 2024):

Looks like you may have tried to modify applications.yaml and a syntax error has been introduced. You can run komorebic fetch-asc to pull the latest upstream file which should not have any syntax errors.

@LGUG2Z commented on GitHub (Oct 14, 2024): Looks like you may have tried to modify `applications.yaml` and a syntax error has been introduced. You can run `komorebic fetch-asc` to pull the latest upstream file which should not have any syntax errors.
Author
Owner

@rwijtvliet commented on GitHub (Oct 14, 2024):

Thank you for that very fast reply. That was indeed the issue! Maybe it would be a good idea to improve the error messages, so this is more obvious to the user.

About the root cause: I was trying to change applications.yaml so that MS Teams calls also tile, and not float. If you could point me to some documentation (if it exists), I'd be grateful - I didn't find any on the project's page.

@rwijtvliet commented on GitHub (Oct 14, 2024): Thank you for that very fast reply. That was indeed the issue! Maybe it would be a good idea to improve the error messages, so this is more obvious to the user. About the root cause: I was trying to change `applications.yaml` so that MS Teams calls also tile, and not float. If you could point me to some documentation (if it exists), I'd be grateful - I didn't find any on [the project's page](https://github.com/LGUG2Z/komorebi-application-specific-configuration).
Author
Owner

@LGUG2Z commented on GitHub (Oct 14, 2024):

In this case where you want to override a float rule in the community configs I think it makes more sense to add a manage override which targets the particular sub-window you want to be managed: https://lgug2z.github.io/komorebi/common-workflows/force-manage-windows.html

@LGUG2Z commented on GitHub (Oct 14, 2024): In this case where you want to override a float rule in the community configs I think it makes more sense to add a manage override which targets the particular sub-window you want to be managed: https://lgug2z.github.io/komorebi/common-workflows/force-manage-windows.html
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#488