LGUG2Z / komorebi

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

[BUG]: bar does not sync workspace change and had overleap title #1107

Closed ryannewcomer closed 2 weeks ago

ryannewcomer commented 2 weeks ago

Summary

start komorebi with komorebic start --whkd --bar. the bar display correctly. But when i which to another workspace by alt + 2, the bar still show i am on workspace 1. The title is also overleap: image

image this is when i press alt + 2 to change to workspace 2(note), but the bar still show i am in workspace 1(Browser)

Version Information

image

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.bar.json",
  "monitor": {
    "index": 0,
    "work_area_offset": {
      "left": 0,
      "top": 40,
      "right": 0,
      "bottom": 40
    }
  },
  "font_family": "JetBrains Mono",
  "theme": {
    "palette": "Base16",
    "name": "Nord",
    "accent": "Base0D"
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": false
        },
        "layout": {
          "enable": true
        },
        "focused_window": {
          "enable": true,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": true
      }
    },
    {
      "Memory": {
        "enable": true
      }
    },
    {
      "Network": {
        "enable": true,
        "show_total_data_transmitted": true,
        "show_network_activity": true
      }
    },
    {
      "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

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 alt + shift + m : komorebic toggle-maximize

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 + left : komorebic stack left alt + down : komorebic stack down alt + up : komorebic stack up alt + 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 + 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

image

ryannewcomer commented 2 weeks ago

my komorebi.json

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.30/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 20,
  "default_container_padding": 20,
  "border": true,
  "border_width": 8,
  "border_offset": -1,
  "border_colours": {
    "single": "#42a5f5",
    "stack": "#00a542",
    "monocle": "#ff3399",
    "unfocused": "#808080"
  },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300,
      "focused_text": "#00a542",
      "unfocused_text": "#b3b3b3",
      "background": "#141414"
    }
  },
  "monitors": [
    {
      "workspaces": [
        {
          "name": "Browser",
          "initial_workspace_rules":  [
            {
              "id": "zen",
              "kind": "Title",
              "maching_strategy": "StartWith"
            }
          ]       },
        {
          "name": "note",
          "initial_workspace_rules": [
            {
              "id": "OneNote",
              "kind": "Title",
              "maching_strategy": "StartWith"
            }
          ]
        },
        {
          "name": "terminal",
          "initial_workspace_rules": [
            {
              "id": "WindowsTerminal",
              "kind": "Title",
              "matching_strategy": "Contains" 
            }
          ]
        },
        {
          "name": "IV",
          "layout": "UltrawideVerticalStack"
        },
        {
          "name": "V",
          "layout": "Rows"
        },
        {
          "name": "VI",
          "layout": "Grid"
        },
        {
          "name": "VII",
          "layout": "RightMainVerticalStack"
        }
      ]
    }
  ]
}
LGUG2Z commented 2 weeks ago

Regarding the overlapping: it is the user's responsibility to set a sensible number of widgets and/or modify display format options to best fit the size constraints of their physical monitor.

You can also look into setting a smaller max_label_width in your config (the default is 400.0).

LGUG2Z commented 2 weeks ago

Regarding the workspace widget not updating: this can sometimes happen when there is a runtime error which prohibits the bar from receiving the latest updates from the window manager. There is no way for this to be remediated without stopping and starting the bar again to force it to re-subscribe.

ryannewcomer commented 2 weeks ago

got it, thanks