Skip to content

feat(overlay): let the user pick which monitor shows the overlay - #26

Merged
Roddygithub merged 1 commit into
mainfrom
feat/monitor-selection
Oct 1, 2026
Merged

Roddygithub merged 1 commit into
mainfrom
feat/monitor-selection

Conversation

@Roddygithub

Copy link
Copy Markdown
Owner

Closes #21

What

Adds a monitor setting so the overlay can be pinned to a specific
display instead of the compositor's default.

Value Behaviour
primary (default) first monitor in GDK's list
cursor / active monitor under the pointer, resolved live
index:N Nth monitor, wraps around

How

  • MonitorConfig enum + resolve_monitor() in layer_shell.rs, applied
    with gtk4_layer_shell::set_monitor() at startup and re-resolved on every
    settings message, so changing the setting moves the overlay live.
  • Cursor detection uses seat.pointer().surface_at_position() +
    display.monitor_at_surface() — no manual geometry math.
  • OverlaySettings.monitor is #[serde(default)] so older plugin builds
    still deserialize (default Primary); is_valid() only accepts known
    monitor values so a malformed string never reaches set_monitor().
  • Plugin gets a monitor SELECT (primary / cursor / index 0-3) sent in
    sendSettings().

Gates

cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings && cargo test   → 40 passed
cd plugin && npm run lint && npm test                                                          → 25 passed

memory-bank/progress.md updated per AGENTS.md.

Adds a monitor selection setting (primary / cursor / index:N) to the
overlay config and the Vencord plugin. The layer-shell window is
assigned with gtk4_layer_shell::set_monitor() at startup and re-resolved
on every settings message.

Older clients that omit the field still deserialize (defaults to
Primary); is_valid() accepts only known monitor values.

Closes #21
@Roddygithub
Roddygithub merged commit c8e377a into main Oct 1, 2026
6 checks passed
@Roddygithub
Roddygithub deleted the feat/monitor-selection branch October 1, 2026 21:10
Roddygithub added a commit that referenced this pull request Oct 1, 2026
…tings table (#27)

- Contents anchors, highlights before install, usage before build
- How it compares: Overlayed/Discover/DiscordOverlayLinux, verified stacks
- Settings table documents monitor (added in #26)
- Downloads badge; stale root dir name and multi-monitor note fixed
- Move the 'not published in AUR' caveat into Distribution
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.

Allow users to select which monitor to display the overlay on

1 participant