Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: ERROR komorebi::process_command: there is no container in one workspace #1052

Open
bedge opened this issue Oct 14, 2024 · 6 comments
Open
Labels
bug Something isn't working

Comments

@bedge
Copy link

bedge commented Oct 14, 2024

Summary

Running: v0.1.29

I opened wordpad, monocle'd the window, chose "new" and then opened the "open file" dialog. The dialog was not visible.
From then on, any action on any window in that workspace logs:

2024-10-14T14:45:41.890188Z INFO process_command{ToggleMonocle}:toggle_monocle:monocle_on: komorebi::window_manager: enabling monocle
2024-10-14T14:45:41.890702Z ERROR komorebi::process_command: there is no container

Version Information

❯ komorebic --version
komorebic 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
❯ systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22631 N/A Build 22631

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.29/schema.json",
  "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  // "default_container_padding": 5,
  "border": true,
  "border_width": 0,
  "border_offset": -5,
  "border_style": "System",
  "border_colours": {
    "monocle": "#b6250f",
    "single": "#b1ab1d",
    "stack": "#c26320",
    "unfocused": "#191a1a"
  },
  // "theme": {
  //   "palette": "Base16",
  //   "name": "GoogleDark",
  //   "unfocused_border": "Base0F",
  //   "bar_accent": "Base0D"
  // },
  "global_work_area_offset": {
    "left": -10,
    "top": -10,
    "right": -10,
    "bottom": -20
  },
  "border_implementation" : "Windows",

  // "active_window_border_colors": {
  //   "focused": "Base0D",
  //   "unfocused": "Base03",
  //   "monocle": {
  //     "r": 255,
  //     "g": 165,
  //     "b": 153   
  //   }
  // },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300
    }
  },
  "display_index_preferences": {
    "0": "HPN349B-5&1e786be3&0&UID4357",
    "1": "AUO87A8-5&1e786be3&0&UID4354",
    "2": "HPN349B-5&1e786be3&0&UID4356"
  },
  "monitors": [
    {
      // "display": "0",
      "window_based_work_area_offset": {
        "left": 0,
        "top": 30,
        "right": 0,
        "bottom": 30
      },
      "window_based_work_area_offset_limit" : 5,
      "workspaces": [
        {
          "name": "I",
          "layout": "UltrawideVerticalStack"        },
        {
          "name": "II",
          "layout": "UltrawideVerticalStack"        },
        {
          "name": "III",
          "layout": "UltrawideVerticalStack"        },
        {
          "name": "IV",
          "layout": "UltrawideVerticalStack"},
        {
          "name": "V",
          "layout": "UltrawideVerticalStack"        },
        {
          "name": "VI",
          "layout": "UltrawideVerticalStack"        },
        {
          "name": "VII",  
          "layout": "UltrawideVerticalStack"        }
      ]
    },
    {
      // "display": "1",

      "workspaces": [
        {
          "name": "I",
          "layout": "BSP"
        },
        {
          "name": "II",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "III",
          "layout": "Grid"
        },
        {
          "name": "IV",
          "layout": "Columns"
        }
      ]
    },
    {
      // "display": "2",

      "workspaces": [
        // work comms
        {
          "name": "WC",
          "layout": "Rows"
        },
        // docs/ref
        {
          "name": "REF",
          "layout": "HorizontalStack"
        },
        // personal
        {
          "name": "PC",
          "layout": "Rows"
        }
      ]
    }
  ]
}

Hotkey Configuration

#Requires AutoHotkey v2.0.2
#SingleInstance Force
; https://www.autohotkey.com/docs/v2/howto/WriteHotkeys.htm
; ^ Ctrl
; ! Alt
; + Shift
; # Win
; * wildcard - allows the hotkey to fire even if you are holding modifier keys that the hotkey doesn't include symbols for.
; ~ no-suppress - prevents the hotkey from blocking the key's native function.
; $ use hook - prevents unintentional loops when sending keys, and in some instances makes the hotkey more reliable.
; <,> - prefix to specify the left or right variant of that key. The modifier combination <^>! corresponds to the AltGr key (if present on your keyboard layout), since the operating system implements it as a combination of LCtrl and RAlt.

; Focus windows (alt)
; Stack windows (win & alt)
; Move windows (alt-shift)

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

!q::Komorebic("close")
!m::Komorebic("minimize")

; Focus windows (alt)
!h::Komorebic("focus left")
!j::Komorebic("focus down")
!k::Komorebic("focus up")
!l::Komorebic("focus right")
!Left::Komorebic("focus left")
!Down::Komorebic("focus down")
!Up::Komorebic("focus up")
!Right::Komorebic("focus right")

!+[::Komorebic("cycle-focus previous")
!+]::Komorebic("cycle-focus next")

; Move windows (alt-shift)
!+h::Komorebic("move left")
!+j::Komorebic("move down")
!+k::Komorebic("move up")
!+l::Komorebic("move right")
!+Left::Komorebic("move left")
!+Down::Komorebic("move down")
!+Up::Komorebic("move up")
!+Right::Komorebic("move right")

; Stack windows (win & alt)
#!Left::Komorebic("stack left")
#!Down::Komorebic("stack down")
#!Up::Komorebic("stack up")
#!Right::Komorebic("stack right")
#!u::Komorebic("unstack")
#![::Komorebic("cycle-stack previous")
#!]::Komorebic("cycle-stack next")

; Resize
!=::Komorebic("resize-axis horizontal increase")
!-::Komorebic("resize-axis horizontal decrease")
!+=::Komorebic("resize-axis vertical increase")
!+_::Komorebic("resize-axis vertical decrease")

; Manipulate windows
!f::Komorebic("toggle-float")
!z::Komorebic("toggle-monocle")

; Window manager options
!+r::Komorebic("retile")
!p::Komorebic("toggle-pause")

; Layouts
!x::Komorebic("flip-layout horizontal")
!y::Komorebic("flip-layout vertical")

; Workspaces
!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")

; Move windows across workspaces
!+1::Komorebic("move-to-workspace 0")
!+2::Komorebic("move-to-workspace 1")
!+3::Komorebic("move-to-workspace 2")
!+4::Komorebic("move-to-workspace 3")
!+5::Komorebic("move-to-workspace 4")
!+6::Komorebic("move-to-workspace 5")
!+7::Komorebic("move-to-workspace 6")
!+8::Komorebic("move-to-workspace 7")

Output of komorebic check

❯  komorebic check
KOMOREBI_CONFIG_HOME detected: C:\Users\edgeb1\.config\komorebi

Looking for configuration files in C:\Users\edgeb1\.config\komorebi

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

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

Note: running:

komorebic start --ahk --bar
@bedge bedge added the bug Something isn't working label Oct 14, 2024
@bedge
Copy link
Author

bedge commented Oct 14, 2024

All ahk key bindings appear inactive on that single workspace.
All other workspaces functioning normally.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 14, 2024

If I'm understanding this correctly, it is the intended behaviour - when monocle mode is enabled commands such as focus/move etc. will not be processed until monocle mode is disabled.

Monocle mode should be thought of as an override - it remains in effect until it is explicitly removed.

@bedge
Copy link
Author

bedge commented Oct 14, 2024

This includes the ability to toggle monocle mode.
There was some odd mouse pointer relocating happening too in that many commands put the mouse pointer back in the center of the ex-monocle'd window.
It's like it lost the "monocle'd" state, so I couldn't de-monocle it.

Possibly related to wordpad opening a file dialog?
I never saw the file dialog come up, so maybe it was behind the monocled window, but had focus? Although an ESC should have closed it.
I closed the window that was still in the monocled position, but that workspace is unusable.
It still has one shell window in it, which I can select, but none of the AHK mappings to anything to it.

It feels like komorebi has no control in this workspace. The only things that appear to work are switch to and switch away from it.
Other workspaces appear normal.
I can switch to it. and interact with the window therein, but no komorebi keys work.

Let me know if there's anything I can do in this state to collect diag data.

@bedge
Copy link
Author

bedge commented Oct 14, 2024

I opened a window on another monitor and dragged it to the broken workspace on the other monitor and new windows appear OK, in that I can interact with them via the AHK keys, however the windows that was there when this happened is ignored.
It's not included in the tiling/rearrangements of the new windows.

@bedge
Copy link
Author

bedge commented Oct 14, 2024

There's actually 2 windows that were still open on the broken workspace.
These now appear on all of my komorebi workspaces.

I think the act of dragging a komorebi managed window into this workspace restored an active container there, as now I can manage new windows there OK.
It's just the other 2 that were left when this happened appear to be orphans and as such are not affected by komorebi workspace switching.
I'm trying to avoid restarting as I don't have any of the auto mapping setup yet, but I think I can just close those to remnants/orphans and it's effectively a usable workspace again.

I'll try replicate again after work.

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 14, 2024

This includes the ability to toggle monocle mode.

If you were unable to have any commands processed, it's possible you may have been hit by a separate bug that I'm trying to address here: b094466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants