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]: Komorebi bar only opens the bar on the monitor where my cursor is present #1081

Open
saipavanc opened this issue Oct 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@saipavanc
Copy link

saipavanc commented Oct 23, 2024

Summary

I have the following configuration for komorebi bar in my dual monitor setup. When I am launching the wm with komorebi start --bar --whkd, I noticed that the bar would launch on the monitor where my cursor is present. If the cursor is present in the monitor of the same index as the one in bar.json file, it works out to be fine. Otherwise, the bar is half rendered behind the windows on the wrong monitor, even though the workspace pager shows the correct workspaces for the monitor index in the config file. I also could not figure out a way to have two bars on my two monitors. Looked for it online forums as well as the config, was not obvious at all. Thanks for all the great work! Windows finally seems usable.

Version Information

OS Name:                   Microsoft Windows 10 Pro
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.bar.json",
  "monitor": {
    "index": 1,
    "work_area_offset": {
      "left": 0,
      "top": 40,
      "right": 0,
      "bottom": 40
    }
  },
  "font_family": "JetBrains Mono",
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "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
      }
    }
  ]
}

komorebi.json

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.29/schema.json",
  "app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml",
  "window_hiding_behaviour": "Cloak",
  "cross_monitor_move_behaviour": "Insert",
  "default_workspace_padding": 2,
  "default_container_padding": 2,
  "border": true,
  "border_width": 2,
  "border_offset": -1,
  "focus_follows_mouse": "Windows",
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "unfocused_border": "Base03",
    "bar_accent": "Base0D"
  },
  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "tabs": {
      "width": 300
    }
  },
  "monitors": [
    { 
      "workspaces": [
        {
          "name": "1",
          "layout": "BSP"
        },
        {
          "name": "2",
          "layout": "BSP"
        },
        {
          "name": "3",
          "layout": "BSP"
        },
        {
          "name": "4",
          "layout": "BSP"
        },
        {
          "name": "5",
          "layout": "BSP"
        },
        {
          "name": "6",
          "layout": "BSP"
        },
        {
          "name": "7",
          "layout": "BSP"
        },
        {
          "name": "8",
          "layout": "BSP"
        },
        {
          "name": "9",
          "layout": "BSP"
        },
        {
          "name": "10",
          "layout": "BSP"
        }
      ]
    },
    {
      "workspaces": [
        {
          "name": "11",
          "layout": "BSP"
        },
        {
          "name": "12",
          "layout": "BSP"
        },
        {
          "name": "13",
          "layout": "BSP"
        },
        {
          "name": "14",
          "layout": "BSP"
        },
        {
          "name": "15",
          "layout": "BSP"
        },
      ]
    }
  ],
  "display_index_preferences": {
    "0": "DELD014-4&33d6fc89&0&UID249395",
    "1": "DEL415A-4&33d6fc89&0&UID224795"
  }
}

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 + shift + w                 : start firefox
alt + shift + c                 : code
alt + return                 : start wt

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 + shift + left         : komorebic move left
alt + shift + down         : komorebic move down
alt + shift + up         : komorebic move up
alt + shift + right         : komorebic move right
alt + shift + return    : komorebic promote

# Stack windows
alt + h              : komorebic stack left
alt + j              : komorebic stack down
alt + k                : komorebic stack up
alt + 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 + m         : 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
alt + 9                 : komorebic focus-workspace 8
alt + 0                 : komorebic focus-workspace 9

# 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
alt + shift + 9         : komorebic move-to-workspace 8
alt + shift + 0         : komorebic move-to-workspace 9

Output of komorebic check

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

Looking for configuration files in C:\Users\username

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

Found C:\Users\username\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
@saipavanc saipavanc added the bug Something isn't working label Oct 23, 2024
@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 23, 2024

Hello and thanks for the report. There are currently a bunch of fixes for various bar issues on the latest nightly release.

To avoid duplicating effort please first confirm if you can reproduce these issues on the nightly release.

@saipavanc
Copy link
Author

I tried to install the nightly from winget, it seems like it is not accessible.

winget install LGUG2Z.komorebi.Nightly
Found komorebi Nightly [LGUG2Z.komorebi.Nightly] Version 0.1.30
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/LGUG2Z/komorebi/releases/download/nightly/komorebi-nightly-x86_64.msi
An unexpected error occurred while executing the command:
Download request status is not success.
0x80190194 : Not found (404).

Otherwise, is building from source the only option?

@LGUG2Z
Copy link
Owner

LGUG2Z commented Oct 23, 2024

Another thing for me to fix when I'm back from vacation 😅

Yes, until I have a computer to fix the nightly builds, you'll need to build from source, or download the artifacts from the GitHub actions run on a recent commit.

To set expectations: probably don't expect any movement on this for 2 weeks or so.

Also the komorebi bar version that you're running does not support running on more than one monitor (ie. It is an explicit design decision to only support a single monitor)

@saipavanc
Copy link
Author

I see, thanks for letting me know, that makes sense now. I do not think it was mentioned anywhere that it is specifically supported for a single monitor setup, making that clear would hep the confusion. I can try and use another bar like yasb.

No worries, enjoy your vacation! I will try to build this from source when I will have more time. I have another question about the initial-workspace-rule, but I can open another issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants