LGUG2Z / komorebi

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

[BUG]: Komorebi ffm mode ignores floating windows #1044

Closed Doomwhite closed 1 month ago

Doomwhite commented 1 month ago

Summary

The legacy ffm mode respects the floating windows and won't change focus if the mouse is in one of them, the Komorebi ffm mode doesn't, it ignores the floating windows. It's makes the floating windows unusable.

https://github.com/user-attachments/assets/a4367f3d-9373-4aac-abdf-12115c36bcf8

Version Information

OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.19045 N/A Build 19045 komorebic 0.1.29 tag:v0.1.29 commit_hash:818ac340 build_time:2024-09-28 01:48:31 +00:00 build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),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:KOMOREBI_CONFIG_HOME/applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 3,
  "default_container_padding": 4,
  "border": true,
  "border_width": 5,
  "border_offset": -1,
  "mouse_follows_focus": true,
  "focus_follows_mouse": "Komorebi",
  "theme": {
    "palette": "Catppuccin",
    "name": "Mocha"
  },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "I - 1",
          "layout": "BSP"
        },
        {
          "name": "I - 2",
          "layout": "BSP"
        },
        {
          "name": "I - 3",
          "layout": "BSP"
        }
      ]
    },
    {
      "workspaces": [
        {
          "name": "II - 1",
          "layout": "BSP"
        },
        {
          "name": "II - 2",
          "layout": "BSP"
        },
        {
          "name": "II - 3",
          "layout": "BSP"
        }
      ]
    }
  ]
}

Hotkey Configuration

Requires AutoHotkey v2.0.18

SingleInstance Force

; Get the current script's PID (Process ID) currentPID := ProcessExist()

; Change the priority of the current script's process to High ProcessSetPriority("High", currentPID)

; Match windows using substring matching SetTitleMatchMode(2)

; Eliminate delay between simulated key presses SetKeyDelay(-1)

; Eliminate delay between simulated mouse movements/clicks SetMouseDelay(-1)

; Run script without delay between lines of code A_BatchLines := -1

; Maximize thread priority Thread.Priority := 10

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

KomorebiRestart() { RunWait("komorebic.exe stop --bar; komorebic.exe start --bar", , "Hide") }

; Define the Hyper key combination as a variable Ctrl := "^" Alt := "!" Shift := "+" Winkey := "#" Meh := Ctrl Alt Shift Hyper := Meh Winkey

Modifier := Alt

Hotkey(Modifier "q", () => Komorebic("close")) Hotkey(Modifier "m", () => Komorebic("minimize"))

; Focus windows Hotkey(Modifier "h", () => Komorebic("focus left")) Hotkey(Modifier "j", () => Komorebic("focus down")) Hotkey(Modifier "k", () => Komorebic("focus up")) Hotkey(Modifier "l", () => Komorebic("focus right")) Hotkey(Modifier "[", () => Komorebic("cycle-focus previous")) Hotkey(Modifier "]", () => Komorebic("cycle-focus next"))

; Move windows Hotkey(Modifier "u", () => Komorebic("cycle-move next")) Hotkey(Modifier "i", () => Komorebic("cycle-move previous"))

; Stack windows Hotkey(Modifier "Left", () => Komorebic("stack left")) Hotkey(Modifier "Down", () => Komorebic("stack down")) Hotkey(Modifier "Up", () => Komorebic("stack up")) Hotkey(Modifier "Right", () => Komorebic("stack right"))

; Resize windows Hotkey(Modifier "=", () => Komorebic("resize-axis horizontal increase")) Hotkey(Modifier "-", () => Komorebic("resize-axis horizontal decrease"))

; Manipulate windows Hotkey(Modifier "t", () => Komorebic("toggle-float")) Hotkey(Modifier "f", () => Komorebic("toggle-monocle"))

; Window manager options ; Hotkey(Modifier "a", () => Komorebic("start")) Hotkey(Modifier "s", () => Komorebic("stop --bar")) Hotkey(Modifier "r", () => Komorebic("check")) Hotkey(Modifier "p", () => Komorebic("toggle-pause"))

; Layouts Hotkey(Modifier "x", () => Komorebic("flip-layout horizontal")) Hotkey(Modifier "y", () => Komorebic("flip-layout vertical"))

; Workspaces Hotkey(Modifier "1", () => Komorebic("focus-workspace 0")) Hotkey(Modifier "2", () => Komorebic("focus-workspace 1")) Hotkey(Modifier "3", () => Komorebic("focus-workspace 2")) Hotkey(Modifier "4", () => Komorebic("focus-workspace 3")) Hotkey(Modifier "5", () => Komorebic("focus-workspace 4")) Hotkey(Modifier "6", () => Komorebic("focus-workspace 5")) Hotkey(Modifier "7", () => Komorebic("focus-workspace 6")) Hotkey(Modifier "8", () => Komorebic("focus-workspace 7"))

; Move windows across workspaces (commented out) Hotkey(Modifier "+1", () => Komorebic("move-to-workspace 0")) Hotkey(Modifier "+2", () => Komorebic("move-to-workspace 1")) Hotkey(Modifier "+3", () => Komorebic("move-to-workspace 2")) Hotkey(Modifier "+4", () => Komorebic("move-to-workspace 3")) Hotkey(Modifier "+5", () => Komorebic("move-to-workspace 4")) Hotkey(Modifier "+6", () => Komorebic("move-to-workspace 5")) Hotkey(Modifier "+7", () => Komorebic("move-to-workspace 6")) Hotkey(Modifier "+8", () => Komorebic("move-to-workspace 7"))

Output of komorebic check

KOMOREBI_CONFIG_HOME detected: C:\Users\Cliente.config\komorebi

Looking for configuration files in C:\Users\Cliente.config\komorebi

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

No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard

LGUG2Z commented 1 month ago

FFM is not going to be worked on anymore from v0.1.30 onwards: https://github.com/LGUG2Z/komorebi/commit/39b549fa1cc8a9e884cc8d726a453fff52995fe2

I suggest that anyone who wants this functionality take inspiration from komorebi's FFM implementation and implement something standalone.

As for the behaviour described in the issue; this is the desired behaviour - komorebi's FFM implementation only reacts to windows managed by komorebi.