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]: stack-all only works when the top-right window is active #1133

Open
Skyppex opened this issue Nov 21, 2024 · 3 comments
Open

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

Skyppex opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Skyppex
Copy link

Skyppex commented 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

@Skyppex Skyppex added the bug Something isn't working label Nov 21, 2024
@LGUG2Z
Copy link
Owner

LGUG2Z commented 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?

@Skyppex
Copy link
Author

Skyppex commented 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
Copy link
Author

Skyppex commented Nov 22, 2024

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

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