Mode HUD: transient bezel and menu-bar sticky glyphs - #9
Open
RyBo wants to merge 5 commits into
Open
Conversation
Pure groundwork for the mode HUD: a HudEvent enum with title/SF-symbol strings and a StickyState suffix for the menu bar, plus a bottom-center hudOrigin helper in Geometry. toggleSplitOrientation now returns the new orientation (nil for a lone leaf) so a caller can report the real result. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New `hud` block controls the mode bezel (enabled, fade_in, hold, fade_out, bottom_offset, font_size), decoded the same way as focus_indicator. Adds negative-value checks to the validator and a commented example block to config.example.yaml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The mode toggles now report their resulting state through onHudEvent (float, zoom, split, preselect, workspace float, focus mode, binding mode enter), each fired after the mutation so a no-op emits nothing. Sticky state is recomputed and pushed at the retile funnel and on every focus-overlay notify, so states cleared without a toggle (a zoomed window closed, a reconcile re-float) still update the menu bar. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
HudController draws a click-through .hudWindow bezel with an SF Symbol and label at the lower center of the target display, fading in, holding, then out. A generation counter keeps a stale fade-out from hiding a bezel that was re-shown, rapid toggles swap content instantly, and a display-change check hides it if its monitor goes away. AppDelegate builds it, feeds it onHudEvent, and reloads its style alongside the overlay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 🌿 status item now appends ⛶/~/≈ when a window is zoomed, the focused window floats, or the desktop is floated, so a state you can't otherwise see stays visible. It seeds from the manager's current state at launch (the controller is built after start) and updates on each pushed change. Output is byte-identical when nothing is sticky. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Toggling a mode (split orientation, float, zoom, workspace float, binding mode) gives no visual feedback today. You can zoom a window, forget about it, and be confused an hour later.
This adds two things:
Transient bezel. A dark translucent rounded bezel (native .hudWindow material, SF Symbol + label) fades in at the lower center of the focused window's display when a mode changes, holds, then fades out. Same treatment as the macOS volume bezel: click-through, never steals focus, fade only. Rapid toggles swap the text in place and reset the dismiss clock. Configurable via a new optional
hud:section (enabled, fade_in, hold, fade_out, bottom_offset, font_size), hot-reloads like the rest of the config.Menu-bar sticky glyphs. While a sticky state is active the status item shows it:
🌿 ⛶zoomed,🌿 ~focused float,🌿 ≈desktop floated. Sticky state is recomputed at the retile funnel, so states cleared without a toggle (closing a zoomed window, a reconcile re-float, a Space switch) update the menu bar too.Implementation follows the existing seams: a pure
HudEvent/StickyStatemodel in the Command layer, emission from the mutation methods (they know the resulting state), and an App-layerHudControllermodeled onFocusOverlayController.toggleSplitOrientationnow returns the new orientation so a lone window emits nothing.Tests: 177 passing (up from 173), covering the event-to-title/symbol mapping, suffix composition, hud config decode and validation, and the new geometry helper.
🤖 Generated with Claude Code