Repository navigation
feat: keep windows clear of StableBar without a tiling window manager - #48
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Fixes #47. Ordinary and maximized windows can cover StableBar when users do not run a tiling window manager. macOS does not provide a public screen-space reservation API for a custom bar.
Changes
Adds Customize → Appearance → Windows → Keep windows clear of StableBar, disabled by default (
bar.keepWindowsClear). Enabling it offers Accessibility access; the settings show whether access is granted. Configuration files, profiles, includes, package layers and command-line bar edits use the existing composition and editing paths.With access, StableBar observes application and window changes, moves overlapping standard windows below each display's bar, and shrinks them when necessary to fit above the Dock. It uses the rendered bar's offset and scaled height, waits for mouse-button release, and remembers attempted frames to avoid repeated attempts. It waits for window notifications to settle and handles resizing before repositioning, so title-bar double-click zoom completes below the bar. Native fullscreen windows, minimized windows, dialogs and hidden applications are skipped. Observers stop when disabled, when access is revoked, during sleep and on exit. Disabling does not restore earlier window positions.
Updates the README, setup guidance, schema and a minimal example. AeroSpace/yabai users should leave this off when those tools already manage their gaps. Apps that do not expose the needed Accessibility operations, or have a minimum size that cannot fit, remain a limitation.
Testing
swift test: all 130 tests pass. New geometry cases cover movement versus shrinking, repeat-call stability, Dock/menu-bar clearance, horizontal and vertical monitor arrangements, display selection for spanning windows, differing bar sizes and bars outside usable space../scripts/build.sh,codesign --verify --deep --strict dist/StableBar.app, example configuration validation andgit diff --checkpass.y = 0toy = 40. Reproduced the title-bar double-click bug (window shrank but stayed aty = 0), fixed the resize/move sequence, and repeated the gesture: the window settled aty = 40, height1400on a3440 × 1440display. The user also confirmed the updated behavior works.Merging
Contains a
feat:commit and afix:follow-up for title-bar zoom. Squash with the PR’sfeat:title to keep one changelog entry. Do not merge until reviewed.GPT-6-astra via Codex in T3 Code.