Repository navigation
Let the user choose which screen the bar appears on - #88
Merged
Merged
Conversation
Add a Screen setting in Appearance (active window, mouse pointer, or primary screen) and a -m/--monitor flag that picks a screen by index for one run. The bar is placed within the screen's visible frame so it stays clear of the menu bar and the Dock on every display.
Ignore invisible, tiny and off-screen windows when finding the active window's screen, and move that lookup into a pure function with tests. Only inset the bar vertically, so a Dock on the side no longer narrows it. Document the bar's placement and that -m follows the display order.
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.
Adds a Screen picker to Settings → Appearance, next to Position:
CGWindowListCopyWindowInfo, which needs no Screen Recording permission or entitlement. Falls back toNSScreen.main, which is what the bar used before, so existing users see no change.NSScreen.screens.first)The setting is persisted in
AppearanceManagerand included in Reset to Defaults.New CLI flag
-m, --monitor <n>(0-based screen index, like dmenu's-m) overrides the setting for that run. Out-of-range or negative indices fall back to the setting.The bar is now placed within the chosen screen's
visibleFrameinstead offrame, so it stays below the menu bar and above the Dock on every display.Screen picking lives in
ScreenPicker, which works on a smallScreenDescribingprotocol so tests can use fake screens. Edits to shared files (SearchViewController,AppearanceSettings*,project.pbxproj) are kept small.Testing
ScreenPickerTests: each mode, pointer on a top edge, windows that span screens, the fallbacks, and the monitor override, including out-of-range values.-m/--monitor, plus settings persistence, reset and model notification tests.xcodebuild ... test: 230 tests, 0 failures.swiftlint --strict: 0 violations.🤖 Generated with Claude Code