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

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

Originally created by @Skyppex on GitHub (Nov 21, 2024).

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

Originally created by @Skyppex on GitHub (Nov 21, 2024). ### 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 ```json { "$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
adam added the bug label 2026-01-05 14:51:18 +01:00
adam closed this issue 2026-01-05 14:51:18 +01:00
Author
Owner

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

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?

@LGUG2Z commented on GitHub (Nov 21, 2024): 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?
Author
Owner

@Skyppex commented on GitHub (Nov 22, 2024):

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 on GitHub (Nov 22, 2024): 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.
Author
Owner

@Skyppex commented on GitHub (Nov 22, 2024):

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

@Skyppex commented on GitHub (Nov 22, 2024): I have updated the autohotkey to be correct, there were some odd characters in there.
Author
Owner

@Skyppex commented on GitHub (Jan 23, 2025):

@LGUG2Z is this issue solved or just unreproducable for you?

@Skyppex commented on GitHub (Jan 23, 2025): @LGUG2Z is this issue solved or just unreproducable for you?
Author
Owner

@LGUG2Z commented on GitHub (Jan 23, 2025):

This was not reproducible for me and I haven't received any other reports of this from users who are heavy users of the stack/unstack all commands.

The only other thing I can think of asking you to do here is to try and reproduce this behavior in a new hyper-v VM, record it and share the log file of what is happening in the recording if you can get a reliable repro in a clean environment 🤔

@LGUG2Z commented on GitHub (Jan 23, 2025): This was not reproducible for me and I haven't received any other reports of this from users who are heavy users of the stack/unstack all commands. The only other thing I can think of asking you to do here is to try and reproduce this behavior in a new hyper-v VM, record it and share the log file of what is happening in the recording if you can get a reliable repro in a clean environment 🤔
Author
Owner

@Skyppex commented on GitHub (Jan 28, 2025):

@LGUG2Z I did some more testing and remembered a warning i keep getting. I'm using "window_hiding_behavour": "Minimize", as can be seen in the provided config. Changing it to Cloak actually fixes the issue :)

The only problem with doing that is that i use Flow Launcher and often use that to navigate to the an open window. When using Cloak, no windows Cloaked by komorebi seems to be visible to Flow Launcher. Thus, i continue using Minimize until its gone forever and i have to change my ways xD

Thanks for trying to help me out :)

@Skyppex commented on GitHub (Jan 28, 2025): @LGUG2Z I did some more testing and remembered a warning i keep getting. I'm using "window_hiding_behavour": "Minimize", as can be seen in the provided config. Changing it to Cloak actually fixes the issue :) The only problem with doing that is that i use Flow Launcher and often use that to navigate to the an open window. When using Cloak, no windows Cloaked by komorebi seems to be visible to Flow Launcher. Thus, i continue using Minimize until its gone forever and i have to change my ways xD Thanks for trying to help me out :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#528