feat : add per-monitor shell positions#163
Open
ROOCKY-dev wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds per-monitor shell positioning support across bar, notch, and dock to close #162, while keeping global position as the fallback for screens without an override. The change threads screen-aware position resolution through the config layer, shell widgets, and the settings UI.
Changes:
- Added
screenPositionsconfig support plus shared helpers to resolve bar/notch/dock positions per screen. - Updated shell, frame, desktop, overview, notch, and dock components to consume per-screen positions instead of only global values.
- Extended the settings UI and search index to edit/discover per-monitor position overrides, and added focused tests for config validation/resolution.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/config-screen-positions.test.mjs | Adds unit tests for config validation and per-screen position lookup. |
| modules/widgets/overview/ScrollingOverview.qml | Uses per-screen bar position in scrolling overview layout. |
| modules/widgets/overview/Overview.qml | Uses per-screen bar position in overview layout. |
| modules/widgets/defaultview/DefaultView.qml | Resolves notch position per screen and passes screen name downstream. |
| modules/widgets/defaultview/CompactPlayer.qml | Uses screen-aware bar position for the player popup. |
| modules/widgets/dashboard/controls/ShellPanel.qml | Adds per-monitor position editors for bar/notch/dock settings. |
| modules/widgets/dashboard/controls/SettingsIndex.qml | Indexes the new settings entries for search. |
| modules/shell/UnifiedShellPanel.qml | Applies a small fullscreen null-safety fix and uses effective dock position in sidebar margins. |
| modules/notch/NotchContent.qml | Resolves bar/notch positions per screen and passes notch position into the notch component. |
| modules/notch/Notch.qml | Makes notch position externally settable for per-screen placement. |
| modules/globals/GlobalStates.qml | Tracks screenPositions in shell settings snapshots/change detection. |
| modules/frame/ScreenFrameContent.qml | Uses per-screen bar/notch positions for frame restoration logic. |
| modules/frame/ScreenFrame.qml | Uses per-screen bar position for frame reservations. |
| modules/dock/DockContent.qml | Resolves requested/effective dock position per screen with per-screen bar/notch inputs. |
| modules/desktop/Desktop.qml | Uses per-screen bar position to reserve desktop icon space. |
| modules/bar/IntegratedDock.qml | Uses per-screen dock position inside integrated bar mode. |
| modules/bar/BarContent.qml | Resolves per-screen bar/notch/dock positions for bar behavior and integrated dock placement. |
| config/defaults/notch.js | Adds default screenPositions for notch config. |
| config/defaults/dock.js | Adds default screenPositions for dock config. |
| config/defaults/bar.js | Adds default screenPositions for bar config. |
| config/ScreenPositions.js | Introduces shared per-screen position resolution helper. |
| config/ConfigValidator.js | Preserves arbitrary monitor keys inside screenPositions. |
| config/Config.qml | Wires new config fields and exposes per-screen position helper functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3272
to
+3273
| function dockPositionForScreen(screenName) { | ||
| return ScreenPositions.positionForScreen(dock, screenName, "bottom", shellEdgePositions); |
fix : suggested from copilot Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
screenPositionsmaps for bar, notch, and dock configpositionfallbackDetails
This closes #162 and extends the same per-monitor positioning model to notch and dock. Existing configs keep working because each module still uses its global
positionwhen a monitor has no override.Dock collision avoidance remains per-monitor: the configured dock edge is treated as the requested position, and the effective dock edge can still move to avoid bar/notch overlap.
Validation
node --testgit diff --checkeDP-1andDP-3eDP-1top bar/bottom dock andDP-3bottom bar/left dockShellPanelerrors