LGUG2Z / komorebi

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

[BUG]: Komorebi-bar hide_empty_workspaces position vs name #1102

Closed nunix closed 2 weeks ago

nunix commented 2 weeks ago

Summary

I set hide_empty_workspaces to true for my Komorebi bar and I have the widgets displayed on the left.

One bug(?) I'm facing, is that while the workspaces' names are displayed correctly, when clicking on it, it will click on the worksplace at the position instead of named workspace.

Here's a short example:

  1. Workspace 1 & 3 have windows inside and are displayed in the komorebi bar widget
  2. Workspace 2 is empty, and isn't displayed in the komorebi bar widget
  3. If I click in Workspace 3, it will open Workspace 2 instead.

I'm not sure if this can be a quick fix or not but let me know if you need any further information.

As the bug is more inconvenient that hard blocking, feel free to categorize it as low/medium priority.

Thanks a lot for your work!

Version Information

Systeminfo:

OS Name:                       Microsoft Windows Server 2025 Standard
OS Version:                    10.0.26311 N/A Build 26311

Komorebi:

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

komorebi.bar.json:

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json",
  "monitor": {
    "index": 0,
    "work_area_offset": {
      "left": 0,
      "top": 25,
      "right": 0,
      "bottom": 25
    }
  },
  "position": {
    "start": {
      "x": 0,
      "y": 0
    },
    "end": {
      "x": 2560,
      "y": 35
    }
  },
  "font_family": "3270 Nerd Font",
  "font_size": 16,
  "theme": {
    "palette": "Base16",
    "name": "Darkviolet",
    "accent": "Base04"
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": true
        },
        "layout": {
          "enable": true
        }
      }
    },
    {
      "Media": {
        "enable": true
      }
    }
  ],
  "right_widgets": [
    {
      "Storage": {
        "enable": true
      }
    },
    {
      "Cpu": {
        "enable": true
      }
    },
    {
      "Memory": {
        "enable": true
      }
    },
    {
      "Network": {
        "enable": true,
        "show_total_data_transmitted": false,
        "show_network_activity": false
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": true
      }
    }
  ]
}

Hotkey Configuration

.shell powershell

Reload whkd configuration

alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd

alt + o : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell alt + shift + o : komorebic reload-configuration

Apps shortcut

alt + return : wt alt + k : komorebic stop --whkd --bar; komorebic start --whkd --bar --ffm

App shortcuts - these require shell to be pwsh / powershell

The apps will be focused if open, or launched if not open

alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }

alt + b : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }

alt + q : komorebic close alt + m : komorebic minimize

Focus windows

alt + left : komorebic focus left alt + down : komorebic focus down alt + up : komorebic focus up alt + right : komorebic focus right alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ]

Move windows

alt + ctrl + left : komorebic move left alt + ctrl + down : komorebic move down alt + ctrl + up : komorebic move up alt + ctrl + right : komorebic move right alt + ctrl + return : komorebic promote

Stack windows

alt + shift + left : komorebic stack left alt + shift + down : komorebic stack down alt + shift + up : komorebic stack up alt + shift + right : komorebic stack right alt + oem_1 : komorebic unstack # oem_1 is ; alt + oem_4 : komorebic cycle-stack previous # oem_4 is [ alt + oem_6 : komorebic cycle-stack next # oem_6 is ]

Resize

alt + oem_plus : komorebic resize-axis horizontal increase alt + oem_minus : komorebic resize-axis horizontal decrease alt + shift + oem_plus : komorebic resize-axis vertical increase alt + shift + oem_minus : komorebic resize-axis vertical decrease

Manipulate windows

alt + t : komorebic toggle-float alt + shift + f : komorebic toggle-monocle

Window manager options

alt + shift + r : komorebic retile alt + p : komorebic toggle-pause

Layouts

alt + x : komorebic flip-layout horizontal alt + y : komorebic flip-layout vertical

Workspaces

alt + 1 : komorebic focus-workspace 0 alt + 2 : komorebic focus-workspace 1 alt + 3 : komorebic focus-workspace 2 alt + 4 : komorebic focus-workspace 3 alt + 5 : komorebic focus-workspace 4 alt + 6 : komorebic focus-workspace 5 alt + 7 : komorebic focus-workspace 6 alt + 8 : komorebic focus-workspace 7

Move windows across workspaces

alt + ctrl + 1 : komorebic move-to-workspace 0 alt + ctrl + 2 : komorebic move-to-workspace 1 alt + ctrl + 3 : komorebic move-to-workspace 2 alt + ctrl + 4 : komorebic move-to-workspace 3 alt + ctrl + 5 : komorebic move-to-workspace 4 alt + ctrl + 6 : komorebic move-to-workspace 5 alt + ctrl + 7 : komorebic move-to-workspace 6 alt + ctrl + 8 : komorebic move-to-workspace 7 alt + ctrl + next : komorebic cycle-move-to-workspace next alt + ctrl + prior : komorebic cycle-move-to-workspace previous

Cycle between workspaces

alt + next : komorebic cycle-workspace next alt + prior : komorebic cycle-workspace previous alt + oem_3 : komorebic focus-last-workspace # oem_3 is `

Output of komorebic check

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

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

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

"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\nunix.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 2 weeks ago

Thanks for reporting this very subtle bug with a clear repro! I'll take a look into this later this week and hopefully land a fix for the next nightly release on Saturday 🤞