LGUG2Z / komorebi

A tiling window manager for Windows 🍉
https://lgug2z.github.io/komorebi/
Other
9.58k stars 198 forks source link

[BUG]: stack-all only works when the top-right window is active #1133

Open Skyppex opened 1 day ago

Skyppex commented 1 day ago

Summary

When running komorebic stack-all i'm experiencing some odd behavior. When the top-right most window is active, the command works as expected, but in all other cases it first stacks all the windows and then proceeds to unstack them all again. If i aready have a stack with some of the windows, they also become unstacked leaving me with no stacks on the monitor. Note that this behavior is contained to only a single monitor, but happens on all monitors.

Version Information

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.29/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml",
  "window_hiding_behaviour": "Minimize",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 2,
  "default_container_padding": 2,
  "border": true,
  "border_width": 4,
  "border_offset": -1,
  "theme": {
    "palette": "Catppuccin",
    "name": "Mocha",
    "unfocused_border": "Base",
    "bar_accent": "Mauve",
    "single_border": "Mauve",
    "stack_border": "Red",
    "stackbar_focused_text": "Red",
    "stackbar_unfocused_text": "Subtext0"
  },
  "animation": {
    "enabled": false,
    "duration": 100,
    "style": "EaseOutQuad",
    "fps": 60
  },
  "stackbar": {
    "label": "Process",
    "height": 20,
    "mode": "OnStack",
    "tabs": {
      "width": 150,
      "font_family": "JetBrains Mono"
    }
  },
  "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"
        }
      ]
    }
  ],
  "display_index_preferences": {
    "0": "SAM73F7-4&2c4d2617&0&UID45383"
  }
}

Hotkey Configuration

Requires AutoHotkey v2.0.2

SingleInstance Force

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

; # = Win key or super key ; ^ = Ctrl key ; + = Shift key ; ! = Alt key ; & = Used to combine two hotkeys ; :: = Separates the hotkey from the action ; {} = Used to group actions together

r::Reload

^y::RunWait("yasb.exe")

^s::Komorebic("start --ahk")

^q::Komorebic("stop")

q::Komorebic("close")

i::Komorebic("minimize")

+f::Komorebic("manage")

; Focus windows

h::Komorebic("focus left")

j::Komorebic("focus down")

k::Komorebic("focus up")

l::Komorebic("focus right")

b::{

if !WinExist("ahk_exe opera.exe") {
    Run("opera.exe")
} else {
    WinActivate("ahk_exe opera.exe")
}

}

+b::Run("opera.exe")

t::{

if !WinExist("ahk_exe wezterm-gui.exe") {
    Run("wezterm-gui.exe")
} else {
    WinActivate("ahk_exe wezterm-gui.exe")
}

}

+t::Run("wezterm-gui.exe")

c::{

if !WinExist("ahk_exe slack-app.exe") {
    Run("slack-app.exe")
} else {
    WinActivate("ahk_exe slack-app.exe")
}

}

m::{

if !WinExist("ahk_exe spotify.exe") {
    Run("spotify.exe")
} else {
    WinActivate("ahk_exe spotify.exe")
}

}

; Move windows

+h::Komorebic("move left")

+j::Komorebic("move down")

+k::Komorebic("move up")

+l::Komorebic("move right")

; Stack windows

Left::Komorebic("stack left")

Down::Komorebic("stack down")

Up::Komorebic("stack up")

Right::Komorebic("stack right")

s::Komorebic("stack-all")

u::Komorebic("unstack")

+u::Komorebic("unstack-all")

å::Komorebic("cycle-stack previous") ; equivalent to '[' on a non-scandinavian keyboard

æ::Komorebic("cycle-stack next") ; equivalent to ']'

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

o::Komorebic("toggle-monocle")

; Window manager options

+r::Komorebic("retile")

p::Komorebic("toggle-pause")

; Layouts

x::Komorebic("flip-layout horizontal")

y::Komorebic("flip-layout vertical")

^å::Komorebic("change-layout ultrawide-vertical-stack") ; equivalent to ']'

^h::Komorebic("change-layout bsp")

^j::Komorebic("change-layout columns")

^k::Komorebic("change-layout rows")

^l::Komorebic("change-layout vertical-stack")

^ø::Komorebic("change-layout grid") ; equivalent to ' (tick)

Output of komorebic check

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

Looking for configuration files in C:\Users\username

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

Your configuration file contains some options that have been renamed or deprecated:

"applications.yaml" is now "applications.json" The "Minimize" option for "window_hiding_behaviour" is deprecated and can be removed or replaced with "Cloak" Found C:\Users\username.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

LGUG2Z commented 1 day ago

I'm not able to reproduce this - can you give some more information about the exact layout, number of windows open, composition of stacks vs. single windows that you're able to reproduce this with?

Skyppex commented 22 hours ago

The minimal layout i managed to reproduce this issue is a single screen with only two windows side by side using the BSP layout. I just do it when I have the left window active and it happens. Any more windows being added, stacked or not, doesn't change the behavior. It also doesn't seem to matter where the stacked windows are on the screen. If the top-right window is a stack, it will still work if I stack-all when the stack is active.

I'm experiencing this on my work laptop and my home desktop. They use the same configuration. My home desktop has two screens setup, one vertical and one horizontal. My laptop is usually connected to two other screens, both horizontal. I tested with only one screen by unplugging the laptop from the USB dock making the integrated screen the only screen.

I'm not sure it would matter, but I have made quite a few changes to my registry to make the windows key work bette with komorebi; I disabled all the hotkeys I could that windows has setup by default. Some can't be removed, but they are captured by autohotkey first so it's not a problem for me.

Skyppex commented 22 hours ago

I have updated the autohotkey to be correct, there were some odd characters in there.