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]: Pressing ALT + SHIFT + l breaks cycling between workspaces #851

Closed
H7ioo opened this issue May 27, 2024 · 8 comments
Closed

[BUG]: Pressing ALT + SHIFT + l breaks cycling between workspaces #851

H7ioo opened this issue May 27, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@H7ioo
Copy link

H7ioo commented May 27, 2024

Describe the bug
ALT + N stops working after using ALT + SHIFT + l on a workspace with one program

To Reproduce
Steps to reproduce the behavior:

  1. Follow the documentation and install komorebi
  2. Run komorebi by typing "komorebic start --whkd" in the terminal
  3. Open 3 programs and send one of them to another workspace by pressing ALT + SHIFT + 2
  4. Go to the second workspace if you are not there by pressing ALT + 2
  5. Press ALT + SHIFT + l
  6. Press ALT + 1 -> Bug

Expected behavior
It should navigate to N workspace without any issues.

Screenshots and Videos
https://github.com/LGUG2Z/komorebi/assets/37945078/1b603afb-3822-4d3a-acc4-dd5b0d756db4

Operating System
OS Name: Microsoft Windows 11 Home Single Language
OS Version: 10.0.22631 N/A Build 22631

komorebic check Output
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\omarj

Looking for configuration files in C:\Users\omarj

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

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

Additional context
My config is the same one in the documentation.
I tried testing it on 2 different PCs, but the issue continues.
What if I pressed ALT + SHIFT + l in the first workspace? Everything works as expected the programs switch places.


Assuming we have 2 workspaces:
The first workspace contains 2 program
The second workspace contains 1 program

When going to the second workspace and pressing ALT + SHIFT + l it breaks ALT + N, so I can't go back to the first workspace by pressing ALT + 1.

@H7ioo H7ioo added the bug Something isn't working label May 27, 2024
@LGUG2Z
Copy link
Owner

LGUG2Z commented May 27, 2024

I tried following these instructions step by step but I was not able to reproduce. alt + shift + l on ws2 triggers a noop error because it's the only window on that workspace, and then the switch back to ws1 succeeds:

2024-05-27T16:42:32.988895Z  INFO process_command{MoveWindow(Right)}:move_container_in_direction{direction=Right}: komorebi::window_manager: moving container
2024-05-27T16:42:32.989375Z ERROR komorebi::process_command: there is no container or monitor in this direction
2024-05-27T16:42:36.877954Z  INFO process_command{FocusWorkspaceNumber(0)}:focus_monitor{idx=0}: komorebi::window_manager: focusing monitor
2024-05-27T16:42:36.878710Z  INFO process_command{FocusWorkspaceNumber(0)}:focus_workspace{idx=0}: komorebi::window_manager: focusing workspace
2024-05-27T16:42:36.879230Z  INFO process_command{FocusWorkspaceNumber(0)}:focus_workspace{idx=0}:focus_workspace{idx=0}: komorebi::monitor: focusing workspace
2024-05-27T16:42:36.887953Z  INFO process_command{FocusWorkspaceNumber(0)}:focus_workspace{idx=0}:focus_window{idx=0}: komorebi::container: focusing window
2024-05-27T16:42:36.901505Z  INFO process_command{FocusWorkspaceNumber(0)}:focus_workspace{idx=0}:update_focused_workspace{follow_focus=false trigger_focus=true}: komorebi::window_manager: updating
2024-05-27T16:42:36.925552Z  INFO process_command{FocusWorkspaceNumber(0)}: komorebi::process_command: processed

@H7ioo
Copy link
Author

H7ioo commented May 27, 2024

I tried again on my laptop with a fresh install. I closed all the apps from the task manager and I tried again. The same issue happens and my cursor starts flickering. Also, I noticed that all the shortcuts stop working not just ALT + N.

@H7ioo
Copy link
Author

H7ioo commented May 27, 2024

Error from the log:

2024-05-27T19:22:10.778018Z ERROR process_command{MoveWindow(Right)}:move_container_in_direction{direction=Right}: komorebi: panicked at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\alloc\src\collections\vec_deque\mod.rs:732:9:
assertion failed: j < self.len() panic.file="/rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\\library\\alloc\\src\\collections\\vec_deque\\mod.rs" panic.line=732 panic.column=9

@H7ioo
Copy link
Author

H7ioo commented May 27, 2024

After playing around with it I figured out the constraints of the bug.

  1. Only the second workspace causes the bug, other workspaces work fine.
  2. The workspace should have only one program.
  3. Only push to the right produces the bug (ALT + SHIFT + L)

Update:
Third space produces the bug when ALT + SHIFT + J is pressed

@LGUG2Z
Copy link
Owner

LGUG2Z commented May 28, 2024

I'm still not able to reproduce this, it looks like your desktop thinks there is another window in that workspace, or a window on a monitor in the selected direction.

Post your config file and an output of komorebic state immediately before triggering the panic, let's see if there are any clues in there

@H7ioo
Copy link
Author

H7ioo commented May 29, 2024

Config

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.25/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 20,
  "default_container_padding": 20,
  "border": true,
  "border_width": 8,
  "border_offset": -1,
  "border_colours": {
    "single": "#42a5f5",
    "stack": "#00a542",
    "monocle": "#ff3399",
    "unfocused": "#808080"
  },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300,
      "focused_text": "#00a542",
      "unfocused_text": "#b3b3b3",
      "background": "#141414"
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "I",
          "layout": "BSP"
        },
        {
          "name": "II",
          "layout": "VerticalStack"
        },
        {
          "name": "III",
          "layout": "HorizontalStack"
        },
        {
          "name": "IV",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "V",
          "layout": "Rows"
        },
        {
          "name": "VI",
          "layout": "Grid"
        },
        {
          "name": "VII",
          "layout": "RightMainVerticalStack"
        }
      ]
    }
  ]
}

State

{
  "monitors": {
    "elements": [
      {
        "id": 65537,
        "name": "DISPLAY1",
        "device": "BOE0BB2",
        "device_id": "BOE0BB2-4&29af062b&0&UID8388688",
        "size": {
          "left": 0,
          "top": 0,
          "right": 1920,
          "bottom": 1200
        },
        "work_area_size": {
          "left": 0,
          "top": 0,
          "right": 1920,
          "bottom": 1200
        },
        "work_area_offset": null,
        "window_based_work_area_offset": null,
        "window_based_work_area_offset_limit": 1,
        "workspaces": {
          "elements": [
            {
              "name": "I",
              "containers": {
                "elements": [
                  {
                    "id": "p2dnhYZZYvpk0IpOn0tQY",
                    "windows": {
                      "elements": [
                        {
                          "hwnd": 1051030,
                          "title": "Quran Tab and 24 more pages - Personal - MicrosoftÔÇï Edge",
                          "exe": "msedge.exe",
                          "class": "Chrome_WidgetWin_1",
                          "rect": {
                            "left": 47,
                            "top": 47,
                            "right": 886,
                            "bottom": 1106
                          }
                        }
                      ],
                      "focused": 0
                    }
                  },
                  {
                    "id": "4D5MgGGYRbusueGDxcogF",
                    "windows": {
                      "elements": [
                        {
                          "hwnd": 67300,
                          "title": "omar_7ioo@omar7ioo: ~/code/github/toplu-ekle-cli",
                          "exe": "WindowsTerminal.exe",
                          "class": "CASCADIA_HOSTING_WINDOW_CLASS",
                          "rect": {
                            "left": 987,
                            "top": 47,
                            "right": 886,
                            "bottom": 1106
                          }
                        }
                      ],
                      "focused": 0
                    }
                  }
                ],
                "focused": 1
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "BSP"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [
                {
                  "left": 47,
                  "top": 47,
                  "right": 886,
                  "bottom": 1106
                },
                {
                  "left": 987,
                  "top": 47,
                  "right": 886,
                  "bottom": 1106
                }
              ],
              "resize_dimensions": [
                null,
                null
              ],
              "tile": true
            },
            {
              "name": "II",
              "containers": {
                "elements": [
                  {
                    "id": "Bw0KQwmrdgh_BLofFoc1z",
                    "windows": {
                      "elements": [
                        {
                          "hwnd": 396142,
                          "title": "Windows PowerShell",
                          "exe": "WindowsTerminal.exe",
                          "class": "CASCADIA_HOSTING_WINDOW_CLASS",
                          "rect": {
                            "left": 47,
                            "top": 47,
                            "right": 1826,
                            "bottom": 1106
                          }
                        }
                      ],
                      "focused": 0
                    }
                  }
                ],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "VerticalStack"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [
                {
                  "left": 47,
                  "top": 47,
                  "right": 1826,
                  "bottom": 1106
                }
              ],
              "resize_dimensions": [
                null
              ],
              "tile": true
            },
            {
              "name": "III",
              "containers": {
                "elements": [
                  {
                    "id": "D0PPnTdIXWVhM6UPhh50f",
                    "windows": {
                      "elements": [
                        {
                          "hwnd": 196864,
                          "title": "Chrome Remote Desktop - Remote Access - Chrome Remote Desktop",
                          "exe": "msedge.exe",
                          "class": "Chrome_WidgetWin_1",
                          "rect": {
                            "left": 47,
                            "top": 47,
                            "right": 1826,
                            "bottom": 1106
                          }
                        }
                      ],
                      "focused": 0
                    }
                  }
                ],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "HorizontalStack"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [
                {
                  "left": 47,
                  "top": 47,
                  "right": 1826,
                  "bottom": 1106
                }
              ],
              "resize_dimensions": [
                null
              ],
              "tile": true
            },
            {
              "name": "IV",
              "containers": {
                "elements": [
                  {
                    "id": "qkHtC9Jul8hq9zK-0oPXk",
                    "windows": {
                      "elements": [
                        {
                          "hwnd": 68318,
                          "title": "Training Program",
                          "exe": "Notion.exe",
                          "class": "Chrome_WidgetWin_1",
                          "rect": {
                            "left": 47,
                            "top": 47,
                            "right": 1826,
                            "bottom": 1106
                          }
                        }
                      ],
                      "focused": 0
                    }
                  }
                ],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "UltrawideVerticalStack"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [
                {
                  "left": 47,
                  "top": 47,
                  "right": 1826,
                  "bottom": 1106
                }
              ],
              "resize_dimensions": [
                null
              ],
              "tile": true
            },
            {
              "name": "V",
              "containers": {
                "elements": [],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "Rows"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [],
              "resize_dimensions": [],
              "tile": true
            },
            {
              "name": "VI",
              "containers": {
                "elements": [],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "Grid"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [],
              "resize_dimensions": [],
              "tile": true
            },
            {
              "name": "VII",
              "containers": {
                "elements": [],
                "focused": 0
              },
              "monocle_container": null,
              "maximized_window": null,
              "floating_windows": [],
              "layout": {
                "Default": "RightMainVerticalStack"
              },
              "layout_rules": [],
              "layout_flip": null,
              "workspace_padding": 20,
              "container_padding": 20,
              "latest_layout": [],
              "resize_dimensions": [],
              "tile": true
            }
          ],
          "focused": 1
        },
        "last_focused_workspace": 0,
        "workspace_names": {}
      }
    ],
    "focused": 0
  },
  "is_paused": false,
  "resize_delta": 50,
  "new_window_behaviour": "Create",
  "cross_monitor_move_behaviour": "Insert",
  "unmanaged_window_operation_behaviour": "Op",
  "work_area_offset": null,
  "focus_follows_mouse": null,
  "mouse_follows_focus": true,
  "has_pending_raise_op": false
}

@H7ioo
Copy link
Author

H7ioo commented May 29, 2024

New constraint:
VerticalStack -> ALT + SHIFT + l breaks it
HorizontalStack -> ALT + SHIFT + j breaks it

@LGUG2Z LGUG2Z closed this as completed in e8f6a66 May 30, 2024
@LGUG2Z
Copy link
Owner

LGUG2Z commented May 30, 2024

Should be fixed here ^

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