Skip to content

feat: add multi-monitor support to desktop bar#10

Open
Just-Utkarsh wants to merge 2 commits into
bjarneo:mainfrom
Just-Utkarsh:main
Open

feat: add multi-monitor support to desktop bar#10
Just-Utkarsh wants to merge 2 commits into
bjarneo:mainfrom
Just-Utkarsh:main

Conversation

@Just-Utkarsh

@Just-Utkarsh Just-Utkarsh commented Jun 4, 2026

Copy link
Copy Markdown

The desktop bar previously rendered only on the primary display with no screen targeting. This change adds multi-monitor support by introducing a targetScreen property to both Bar.qml and BarHacker.qml, and updating Navbar.qml to instantiate each bar face twice — once per monitor.

The second instance guards itself with Quickshell.screens.length > 1 so it stays hidden when only one display is connected, preventing the double-bar issue that occurred with the previous static screens[1] approach.

Files changed:

  • desktop/Bar.qml — added targetScreen property; binds screen: to it
  • desktop/BarHacker.qml — same as above
  • desktop/Navbar.qml — instantiates two Bar and two BarHacker instances, each targeting a specific screen, with the second pair gated on Quickshell.screens.length > 1

Tested on eDP-1 (primary) + HDMI-A-1 (secondary). Both bars render correctly when the external monitor is connected, and only one bar renders when it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant