[BUG]: komorebic start --bar causes unnecessary resizing #568

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

Originally created by @helmesjo on GitHub (Jan 23, 2025).

Summary

This is arguably a "bug" (at least in a UX-sense), but also border-line feature as well.

When you start komorebic along with the bar then the windows are tiled & resized first, then the bar pops up, then the windows are resized again.
Is there a specific reason for this, or should the order perhaps just be swapped?

OT but slightly related:
Is there a way to measure startup time of the individual parts? Eg. initial tiling, bar setup, whkd etc.

Version Information

OS Name:                   Microsoft Windows 11 Pro

komorebic 0.1.33
tag:v0.1.33
commit_hash:cc51f62c
build_time:2025-01-11 22:30:30 +00:00
build_env:rustc 1.84.0 (9fc6b4312 2025-01-07),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.32/schema.json",
  "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 0,
  "default_container_padding": 0,
  "border": true,
  "border_width": 4,
  "border_offset": -1,
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "unfocused_border": "Base03",
    "bar_accent": "Base0D"
  },
  "stackbar": {
    "height": 24,
    "mode": "OnStack",
    "tabs": {
      "width": 300
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "I",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "II",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "III",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "IV",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "V",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "VI",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "VII",
          "layout": "UltrawideVerticalStack"
        }
      ]
    }
  ],
  "ignore_rules": [
    {
      "kind": "Exe",
      "id": "explorer.exe",
      "matching_strategy": "Equals",
    },
    {
      "kind": "Exe",
      "id": "SystemSettings.*\\.exe",
      "matching_strategy": "Regex",
    },
    {
      "kind": "Exe",
      "id": "ApplicationFrameHost.exe",
      "matching_strategy": "Equals",
    },
    {
      "kind": "Exe",
      "id": "olk.exe",
      "matching_strategy": "Equals",
    },
    {
      "kind": "Exe",
      "id": "ms-teams.exe",
      "matching_strategy": "Equals",
    },
    {
      "kind": "Exe",
      "id": "slack.exe",
      "matching_strategy": "Equals",
    },
    {
      "kind": "Exe",
      "id": "steam.*\\.exe",
      "matching_strategy": "Regex",
    },
    {
      "kind": "Exe",
      "id": "ScreenToGif.exe",
      "matching_strategy": "Equals",
    }
  ]
}

Hotkey Configuration

.shell powershell

# Reload whkd configuration
# alt + o                 : taskkill /f /im whkd.exe && start /b whkd                      # if shell is cmd
alt + o                 : komorebic reload-configuration; taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell
alt + shift + o         : cmd.exe /c "komorebic stop --whkd --bar && komorebic start --whkd --bar --clean-state"

# 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 + return            : start "$env:APPDATA/Microsoft/Windows/Start Menu/Programs/alacritty.lnk"

alt + q                 : komorebic close
alt + shift + q         : powershell -executionpolicy bypass -File "$env:KOMOREBI_CONFIG_HOME/quit-focused-app.ps1"
alt + m                 : komorebic minimize

# Focus windows
alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : 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 + shift + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : komorebic move right
alt + shift + return    : komorebic promote

# Stack windows
alt + ctrl + h          : komorebic stack left
alt + ctrl + j          : komorebic stack down
alt + ctrl + k          : komorebic stack up
alt + ctrl + l          : 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 + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3
alt + shift + 5         : komorebic move-to-workspace 4
alt + shift + 6         : komorebic move-to-workspace 5
alt + shift + 7         : komorebic move-to-workspace 6
alt + shift + 8         : komorebic move-to-workspace 7

Output of komorebic check

KOMOREBI_CONFIG_HOME detected: C:/Users/fho/.config/komorebi

Looking for configuration files in C:/Users/fho/.config/komorebi

Found komorebi.json

Found C:/Users/fho/.config/whkd\whkdrc
Originally created by @helmesjo on GitHub (Jan 23, 2025). ### Summary This is arguably a "bug" (at least in a UX-sense), but also border-line feature as well. When you start `komorebic` along with the bar then the windows are tiled & resized _first_, then the bar pops up, then the windows are resized again. Is there a specific reason for this, or should the order perhaps just be swapped? **OT but slightly related:** Is there a way to measure startup time of the individual parts? Eg. initial tiling, bar setup, whkd etc. ### Version Information ``` OS Name: Microsoft Windows 11 Pro komorebic 0.1.33 tag:v0.1.33 commit_hash:cc51f62c build_time:2025-01-11 22:30:30 +00:00 build_env:rustc 1.84.0 (9fc6b4312 2025-01-07),stable-x86_64-pc-windows-msvc ``` ### Komorebi Configuration ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.32/schema.json", "app_specific_configuration_path": "$Env:KOMOREBI_CONFIG_HOME/applications.json", "window_hiding_behaviour": "Cloak", "cross_monitor_move_behaviour": "Insert", "default_workspace_padding": 0, "default_container_padding": 0, "border": true, "border_width": 4, "border_offset": -1, "theme": { "palette": "Base16", "name": "Ashes", "unfocused_border": "Base03", "bar_accent": "Base0D" }, "stackbar": { "height": 24, "mode": "OnStack", "tabs": { "width": 300 } }, "monitors": [ { "workspaces": [ { "name": "I", "layout": "UltrawideVerticalStack" }, { "name": "II", "layout": "UltrawideVerticalStack" }, { "name": "III", "layout": "UltrawideVerticalStack" }, { "name": "IV", "layout": "UltrawideVerticalStack" }, { "name": "V", "layout": "UltrawideVerticalStack" }, { "name": "VI", "layout": "UltrawideVerticalStack" }, { "name": "VII", "layout": "UltrawideVerticalStack" } ] } ], "ignore_rules": [ { "kind": "Exe", "id": "explorer.exe", "matching_strategy": "Equals", }, { "kind": "Exe", "id": "SystemSettings.*\\.exe", "matching_strategy": "Regex", }, { "kind": "Exe", "id": "ApplicationFrameHost.exe", "matching_strategy": "Equals", }, { "kind": "Exe", "id": "olk.exe", "matching_strategy": "Equals", }, { "kind": "Exe", "id": "ms-teams.exe", "matching_strategy": "Equals", }, { "kind": "Exe", "id": "slack.exe", "matching_strategy": "Equals", }, { "kind": "Exe", "id": "steam.*\\.exe", "matching_strategy": "Regex", }, { "kind": "Exe", "id": "ScreenToGif.exe", "matching_strategy": "Equals", } ] } ``` ### Hotkey Configuration ``` .shell powershell # Reload whkd configuration # alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd alt + o : komorebic reload-configuration; taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell alt + shift + o : cmd.exe /c "komorebic stop --whkd --bar && komorebic start --whkd --bar --clean-state" # 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 + return : start "$env:APPDATA/Microsoft/Windows/Start Menu/Programs/alacritty.lnk" alt + q : komorebic close alt + shift + q : powershell -executionpolicy bypass -File "$env:KOMOREBI_CONFIG_HOME/quit-focused-app.ps1" alt + m : komorebic minimize # Focus windows alt + h : komorebic focus left alt + j : komorebic focus down alt + k : komorebic focus up alt + l : 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 + shift + h : komorebic move left alt + shift + j : komorebic move down alt + shift + k : komorebic move up alt + shift + l : komorebic move right alt + shift + return : komorebic promote # Stack windows alt + ctrl + h : komorebic stack left alt + ctrl + j : komorebic stack down alt + ctrl + k : komorebic stack up alt + ctrl + l : 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 + shift + 1 : komorebic move-to-workspace 0 alt + shift + 2 : komorebic move-to-workspace 1 alt + shift + 3 : komorebic move-to-workspace 2 alt + shift + 4 : komorebic move-to-workspace 3 alt + shift + 5 : komorebic move-to-workspace 4 alt + shift + 6 : komorebic move-to-workspace 5 alt + shift + 7 : komorebic move-to-workspace 6 alt + shift + 8 : komorebic move-to-workspace 7 ``` ### Output of komorebic check ``` KOMOREBI_CONFIG_HOME detected: C:/Users/fho/.config/komorebi Looking for configuration files in C:/Users/fho/.config/komorebi Found komorebi.json Found C:/Users/fho/.config/whkd\whkdrc ```
adam added the bug label 2026-01-05 14:51:39 +01:00
adam closed this issue 2026-01-05 14:51:39 +01:00
Author
Owner

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

You can avoid the double-resize by setting your desired work_area_offset directly in komorebi.json instead of in komorebi.bar.json

@LGUG2Z commented on GitHub (Jan 23, 2025): You can avoid the double-resize by setting your desired `work_area_offset` directly in `komorebi.json` instead of in `komorebi.bar.json`
Author
Owner

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

For startup time benchmarking you could add your own to the start command handler - there are a few calls to sleep in there while polling and waiting for different pieces to come up in a certain order

@LGUG2Z commented on GitHub (Jan 23, 2025): For startup time benchmarking you could add your own to the `start` command handler - there are a few calls to `sleep` in there while polling and waiting for different pieces to come up in a certain order
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#568