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 window stays after closing application available in multiple workspaces #1116

Open
pchomik opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working i-will-not-work-on-this I'm not going to work on this, but someone else is welcome to komorebi Related to the komorebi crate

Comments

@pchomik
Copy link

pchomik commented Nov 12, 2024

Summary

Case to reproduce:

  • open Windows terminal, vscode and opera on the first workspace
  • stack all applications
  • switch to second workspace and open again terminal by pressing mouse middle key on terminal application
  • switch back to first workspace and close WIndows terminal

Result:
Termianl tile doesn't disappear and empty place is still maintained by komorebi app. Border is still available.

image

Same case I tested with File Explorer.
Such issue doesn't exist in 0.1.29 version.

Version Information

OS Name: Microsoft Windows 10 Home
OS Version: 10.0.19045 N/A Build 19045

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_container_behaviour": "Append",
    "window_hiding_behaviour": "Cloak",
    "cross_monitor_move_behaviour": "Insert",
    "default_workspace_padding": 8,
    "default_container_padding": 8,
    "border": false,
    "border_width": 4,
    "border_offset": 0,
    "border_style": "Rounded",
    "focus_follows_mouse": "Komorebi",
    "animation": {
        "enabled": false
    },
    "theme": {
        "palette": "Base16",
        "name": "Onedark",
        "unfocused_border": "Base03",
        "bar_accent": "Base0A",
        "stackbar_focused_text": "Base08",
        "stackbar_background": "Base00"
    },
    "stackbar": {
        "height": 35,
        "mode": "Always",
        "label": "Process",
        "tabs": {
            "width": 250,
            "font_family": "Imprima",
            "font_size": 34
        }
    },
    "monitors": [
        {
            "workspaces": [
                {
                    "name": "I",
                    "layout": "Grid"
                },
                {
                    "name": "II",
                    "layout": "Grid"
                },
                {
                    "name": "III",
                    "layout": "Grid"
                },
                {
                    "name": "IV",
                    "layout": "Grid"
                }
            ]
        }
    ]
}

Hotkey Configuration

#Requires AutoHotkey v2.0.2
#SingleInstance Force

TraySetIcon("./num1.png")

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

workspace := 0
layouts := ["grid", "bsp", "columns", "rows", "vertical-stack", "horizontal-stack"]
layout_index := 1

ChangeToNextWorkspace() {
if (workspace >= 3) {
num := 0
} else {
num := workspace + 1
}
ChangeKomorebicWorkspace(num)
}

ChangeToPrevWorkspace() {
if (workspace <= 0) {
num := 3
} else {
num := workspace - 1
}
ChangeKomorebicWorkspace(num)
}

ChangeKomorebicWorkspace(num) {
global workspace
workspace := num
Komorebic("focus-monitor-workspace 1 " . workspace)
Komorebic("focus-monitor-workspace 0 " . workspace)
TraySetIcon("./num" . num + 1 . ".png")
}

ChangeToNextLayout() {
global layout_index
if (layout_index >= 6) {
layout_index := 1
} else {
layout_index++
}
Komorebic("workspace-layout 1 " . workspace . " " . layouts[layout_index])
Komorebic("workspace-layout 0 " . workspace . " " . layouts[layout_index])
TrayTip "Layout changed", layouts[layout_index]
Sleep 1500 ; Let it display for 3 seconds.
HideTrayTip
}

HideTrayTip() {
TrayTip ; Attempt to hide it the normal way.
if SubStr(A_OSVersion,1,3) = "10." {
A_IconHidden := true
; Sleep 10 ; It may be necessary to adjust this sleep.
A_IconHidden := false
}
}

MoveToWorkspace(num) {
Komorebic("unstack")
Komorebic("move-to-workspace " . num)
ChangeKomorebicWorkspace(num)
}

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

; Focus windows
#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
#+Left:: Komorebic("move left")
#+Down:: Komorebic("move down")
#+Up:: Komorebic("move up")
#+Right:: Komorebic("move right")

; Stack windows
#^[:: Komorebic("stack-all")
#^':: Komorebic("unstack")
#^]:: Komorebic("unstack-all")
!Tab:: Komorebic("cycle-stack next")
#!Right:: Komorebic("cycle-stack next")
!+Tab:: Komorebic("cycle-stack previous")
#!Left:: Komorebic("cycle-stack previous")

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

; Manipulate windows
#t:: Komorebic("toggle-float")
#f:: Komorebic("toggle-monocle")

; Window manager options
#+r:: Komorebic("retile")
#!p:: Komorebic("toggle-pause")
; #Tab:: Komorebic("cycle-layout next")
#Tab:: ChangeToNextLayout()

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

; Workspaces

; #+5::Komorebic("focus-monitor-workspace 1 4"), Komorebic("focus-monitor-workspace 0 4")
; #+6::Komorebic("focus-monitor-workspace 1 5"), Komorebic("focus-monitor-workspace 0 5")
; #+7::Komorebic("focus-monitor-workspace 1 6"), Komorebic("focus-monitor-workspace 0 6")
; #+8::Komorebic("focus-monitor-workspace 1 7"), Komorebic("focus-monitor-workspace 0 7")

; #!Left::Komorebic("cycle-workspace previous")
; #!Right::Komorebic("cycle-workspace next")
; #^Left:: Komorebic("cycle-workspace previous")
; #^Right:: Komorebic("cycle-workspace next")

; #^Left::Komorebic("cycle-stack previous")
; #^Right::Komorebic("cycle-stack next")

; Change workspace
#+1:: ChangeKomorebicWorkspace(0)
#+2:: ChangeKomorebicWorkspace(1)
#+3:: ChangeKomorebicWorkspace(2)
#+4:: ChangeKomorebicWorkspace(3)

#^Right:: ChangeToNextWorkspace()
#^Left:: ChangeToPrevWorkspace()

; Move windows across workspaces
#1:: MoveToWorkspace(0)
#2:: MoveToWorkspace(1)
#3:: MoveToWorkspace(2)
#4:: MoveToWorkspace(3)

#^+Up:: return
#^+Down:: return

Output of komorebic check

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

Looking for configuration files in C:\Users\pawel

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"

"focus_follows_mouse" is now end-of-life

End-of-life features will not receive any further bug fixes or updates; they should not be used

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

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

LGUG2Z commented Jan 23, 2025

Can you confirm if this is still an issue?

@LGUG2Z LGUG2Z added i-will-probably-work-on-this I'll work on this when I get time, but if someone beats me to it, thank you! komorebi Related to the komorebi crate i-will-not-work-on-this I'm not going to work on this, but someone else is welcome to and removed i-will-probably-work-on-this I'll work on this when I get time, but if someone beats me to it, thank you! labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working i-will-not-work-on-this I'm not going to work on this, but someone else is welcome to komorebi Related to the komorebi crate
Projects
None yet
Development

No branches or pull requests

2 participants