feat(panels): add per-panel anchor bar for source-less panel opens - #4091
Open
Excelsies wants to merge 1 commit into
Open
feat(panels): add per-panel anchor bar for source-less panel opens#4091Excelsies wants to merge 1 commit into
Excelsies wants to merge 1 commit into
Conversation
Panels opened by a keybind, the CLI or IPC carry no source bar, so resolvePanelBarConfig() falls through to the first enabled bar. With multiple bars that means a panel whose widget lives on one bar opens attached to a different one. shell.panel_anchor_bar can force a bar, but it is global and overrides the source bar for every panel (b6d1987), so it cannot be used to fix a single panel. Add an optional *_anchor_bar per panel under [shell.panel], consulted only when neither the global anchor nor a source bar resolved a bar: shell.panel_anchor_bar -> source bar -> per-panel *_anchor_bar -> first enabled bar This is purely additive; it fills the case that previously fell through, so existing configurations and the b6d1987 precedence are unchanged.
Excelsies
force-pushed
the
feat/per-panel-anchor-bar
branch
from
August 25, 2026 04:28
dda7215 to
7fe2fac
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
*_anchor_barper panel under[shell.panel], consulted only when neither the global anchor nor a source bar resolved a bar:Covers all six panels (
launcher,clipboard,control_center,wallpaper,session,polkit) to stay symmetric with the existing*_placement/*_positionfamilies.This is purely additive: it only fills the branch that previously fell through to "first enabled bar", so b6d1987's precedence and every existing configuration behave exactly as before.
Motivation
resolvePanelBarConfig()resolves a panel's bar fromshell.panel_anchor_bar, then the opening source bar. Panels opened via a keybind, the CLI or IPC pass nosourceBarName, so with neither set the lookup falls through to "first enabled bar".With multiple bars that means a panel whose widget lives on one bar opens attached to a different one. Concretely: a launcher widget on a bottom bar opens attached to the bottom bar when clicked, but
noctalia msg panel-toggle launcherfrom a keybind opens it attached to the top bar.shell.panel_anchor_barcan force a bar, but it is global and deliberately overrides the source bar for every panel (b6d1987), so it cannot fix one panel without relocating the rest.Type of Change
Related Issue
Closes #4090
Testing
Commands run:
meson setup build --buildtype=release && ninja -C build— clean buildjust format(clang-format 22.1.8)python3 tools/i18n-check.py—OK: 892 tr keys, 7 trp base keys — all present in catalog (2555 entries).meson test -C build—No tests defined.Manual testing on a two-bar setup (top bar
default, bottom barBottom, left/right barSide; launcher widget onBottom), with noshell.panel_anchor_barset andlauncher_anchor_bar = "Bottom":y=774..1388, bottom bar aty=1375)y=34..674)*_anchor_barunsetmainCross-checked the config layer: the stock 5.0.0-beta.9 build reports
shell.panel.launcher_anchor_bar: unknown setting, the patched build validates it.Manual Coverage
Notes on the unchecked boxes: only Hyprland 0.56.2 was available to me, so Niri and Sway are untested. Bars at
top,bottom,leftandrightwere all present and exercised, but I did not vary density settings, so I left that box unchecked rather than half-claim it. Scaling was covered across two monitors at1.0and1.5.Screenshots / Videos
The only UI surface is a new "Anchor Bar" select in each panel's settings group, next to that panel's existing Placement / Position controls, with an empty option for the default.
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
launcher_anchor_bar,control_center_anchor_bar, and so on, matchinglauncher_placement/launcher_position.panelAnchorBarForPanel()mirrors the existingopenNearClickEnabledForPanel()in the same file rather than introducing a new dispatch pattern.stringIfNonEmptyField, so unset values are not serialised and existing configs round-trip unchanged.