Add screen presets feature#1746
Closed
Diastro wants to merge 1 commit into
Closed
Conversation
Save named window-layout presets keyed by monitor count, restore them with a dedicated keyboard shortcut per preset. - New Presets tab in the Settings window shows a live monitor diagram, per-preset shortcut picker (MASShortcutView), and a table of captured app/window rows. - Create a preset via the + button to snapshot every visible window of every running regular app; Add App opens a searchable popover that lists every installed app and captures a single window at a time. - Capture uses CG on-screen list as ground truth (layer 0, alpha > 0, 100x100 minimum) cross-referenced with AX standard windows. - Restore moves windows proportionally using a relative frame stored as 0-1 fractions of the capture-time display, so windows scale to the current display size. Apps that are installed but not running are launched first. Uninstalled apps are pruned automatically. - Primary display is sourced from the system configuration (screen at origin 0,0), not NSScreen.main, so captures are not affected by the currently-focused window. - Presets persist to UserDefaults under "screenPresets" and are kept out of the main Config export/import.
Owner
|
Thanks for contributing! My preference at the moment is to have this new settings tab hidden by default, and shown either by setting a default via Terminal command or via a checkbox in the popover in the ellipsis button at the bottom of the General tab. One of my main goals with Rectangle has always been to keep it really simple and approachable out of the box, although I view it as a community-oriented project so I want to keep it flexible with nearly anything people want to add in. I'll dive into testing and reviewing the code soon. |
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 a new Settings tab for saving and restoring named window-layout presets, each with its own keyboard shortcut.
+to snapshot every visible window of every running regular app, or useAdd App...to pick a single installed app and capture one window at a time via a searchable popover.Restore Nowbutton. Windows are placed proportionally using relative frames (0-1 fractions of the capture-time display), so the layout scales across different-sized displays. Apps that are installed but not running are launched first; uninstalled apps are pruned automatically.NSScreen.main. Each captured window records ascreenIndexso you can move it between primary and secondary displays viaEdit App....UserDefaultsunderscreenPresetsand are deliberately kept out of the main Config export/import.