Skip to content

Step running foot windows to the new text size - #7794

Open
scottjones wants to merge 4 commits into
omacom:quattrofrom
scottjones:foot-live-text-size
Open

scottjones wants to merge 4 commits into
omacom:quattrofrom
scottjones:foot-live-text-size

Conversation

@scottjones

@scottjones scottjones commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

omarchy display text size live-reloads kitty and ghostty, but foot has no config-reload signal, so running foot windows kept their old size and the user got a "Restart Foot" notification instead.

Foot does bind Ctrl+equal/Ctrl+minus to 0.5pt font steps, and Hyprland's send_shortcut can deliver a keypress to a window without focusing it. So this reads the old size from foot.ini before rewriting it, computes the delta in 0.5pt steps, and steps every running foot window to the new size. A window the user has zoomed by hand keeps its zoom relative to the new baseline, and the restart notification remains as a fallback if the dispatch fails.

Longer term this workaround shouldn't be needed: foot has an open feature request for OSC 50 (set font), dnkl/foot#1472, and I have a working implementation at scottjones/foot#osc-50-set-font. If that lands, this becomes a one-line escape sequence printed to each foot window.

Tested live on Hyprland: sizes step up and down across multiple windows, including hand-zoomed ones, and the notification fallback fires when the dispatch is unavailable. There's also a shell test (test/shell.d/display-text-size-foot-test.sh) pinning the step arithmetic, direction, per-window fan-out, zero-delta no-op, and the notification fallback with its replaces-id reuse.

🤖 Generated with Claude Code

Foot has no config-reload signal (upstream considers one out of scope),
so changing the text size could only rewrite foot.ini and ask the user
to restart their terminals. But foot binds Control+equal/Control+minus
to 0.5pt font steps, and Hyprland's send_shortcut delivers a keypress
without focusing the window — so step every running foot window by the
size delta instead. A window the user has zoomed by hand keeps its zoom
relative to the new size, and the restart notification remains as a
fallback when the dispatch fails.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 22, 2026 16:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@scottjones
scottjones marked this pull request as draft August 22, 2026 17:06
scottjones and others added 2 commits August 22, 2026 13:07
When hyprctl was unavailable, resize_foot_windows found no windows and
returned success without stepping anything, which suppressed the
restart notification exactly when it was needed. Treat an empty window
list as a failure; the caller already checks that foot is running
before notifying.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stubs hyprctl, gsettings, pgrep and the notification helper to pin the
step arithmetic (six half-point presses from 9pt to 12pt), direction,
per-window fan-out, class matching, the zero-delta no-op, and the
notification fallback including its replaces-id reuse.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@scottjones
scottjones marked this pull request as ready for review August 22, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants