da-rth / yasb

A highly configurable cross-platform (Windows) status bar written in Python.
MIT License
1.36k stars 80 forks source link

[BUG] Active window widget broken #67

Open pulpocaminante opened 1 year ago

pulpocaminante commented 1 year ago

The window title widget should be working by default, I assume, but it is not. Komorebi is correctly connected, the window title widget is enabled, and the options are set to their default values in config.yaml. We have no errors being printed by main.py, but some esoteric Qt warnings.

The widget fails to appear entirely, unless we set label_no_window, in which case it will flash briefly on startup before disappearing within 100ms or so.

I've tried running it in both a normal and elevated prompt.

As for reproduction, I'm not really sure since this is just running it exactly as it is on github, with all of the default settings, on Windows 11 and Komorebi 0.14

All of the fonts are installed correctly and every other widget is working as expected.

This is the output:

python src/main.py         
Yasb - Yet Another Status Bar
Starting SystemEventListener...
Starting KomorebiEventListener...
Created named pipe yasb-5360e67d-98aa-11ed-a093-001a7dda7115
Waiting for Komorebi to subscribe to named pipe yasb-5360e67d-98aa-11ed-a093-001a7dda7115
Created file watcher for path C:\Users\amnesia\.yasb
Komorebi connected to named pipe: yasb-5360e67d-98aa-11ed-a093-001a7dda7115
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
QWindowsWindow::setDarkBorderToWindow: Unable to set dark window border.
TooSpooky commented 1 year ago

Hello,

I'm also experiencing this issue as well.

hexfactor commented 1 year ago

What fixed this for me was setting the the option monitor_exclusive to false within config.yaml:

widgets:
  active_window:
    type: "yasb.active_window.ActiveWindowWidget"
    options:
      label: "{win[title]}"
      label_alt: "[class_name='{win[class_name]}' exe='{win[process][name]}' hwnd={win[hwnd]}]"
      label_no_window: ""
      max_length: 48
      max_length_ellipsis: "..."
      monitor_exclusive: false