Skip to content

Add configurable window position setting#184

Open
mircea-pop wants to merge 1 commit intotom-james-watson:masterfrom
mircea-pop:configurable-window-position
Open

Add configurable window position setting#184
mircea-pop wants to merge 1 commit intotom-james-watson:masterfrom
mircea-pop:configurable-window-position

Conversation

@mircea-pop
Copy link
Copy Markdown

@mircea-pop mircea-pop commented Apr 10, 2026

Summary

Adds a Window Position preference to the Settings dialog with two options:

  • Center (default) - existing behavior, opens centered on the primary monitor
  • Mouse Cursor (Gtk.WindowPosition.MOUSE) - opens on the monitor where the mouse cursor currently is

Problem: On multi-monitor setups, the picker always opens centered on the primary monitor, even when the user is working on a different screen.

Scope: This PR ensures the picker opens on the correct monitor (where the mouse is). Note that on Wayland, the compositor controls exact window placement - Gtk.WindowPosition.MOUSE tells GTK which monitor to use, but the compositor (e.g. Mutter) determines the exact position within that monitor. Precise cursor-following positioning would require Wayland-specific APIs (e.g. xdg-positioner or layer-shell) which is outside the scope of this change.

Follows existing patterns for settings (theme, skintone) - stored via shelve in user_data.py, exposed as a combo box in settings.py.

Changes

  • emote/user_data.py - window position constants, load_window_position(), update_window_position()
  • emote/settings.py -"Window Position" combo box in Preferences
  • emote/picker.py - use configured position instead of hardcoded CENTER

How was tested

  • Open Emote with default settings → picker opens centered (no behavior change)
  • Open Preferences → change Window Position to "Mouse Cursor" → close Preferences
  • Open Emote again → picker opens on the monitor where the cursor is
  • Restart Emote → setting persists
  • Test on multi-monitor setup (4 monitors): picker appears on the correct monitor

The picker window always opens centered on the primary monitor, which
is inconvenient on multi-monitor setups where the user may be working
on a different screen. This adds a "Window Position" preference with
two options: "Center" (existing default behavior) and "Mouse Cursor"
(opens the picker at the current pointer location).
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