Skip to content

Give TUI and agent windows their terminal's touchpad scroll speed - #15840

Closed
isc wants to merge 2 commits into
omacom:quattrofrom
isc:omarchy-window-touchpad-scroll
Closed

isc wants to merge 2 commits into
omacom:quattrofrom
isc:omarchy-window-touchpad-scroll

Conversation

@isc

@isc isc commented Oct 18, 2026

Copy link
Copy Markdown

Problem

default/hypr/input.lua sets a touchpad scroll speed per terminal, matched on the window class: 1.5 for Alacritty and kitty, 2.0 for foot, 0.2 for Ghostty. Omarchy opens many terminal windows under app-ids of its own: org.omarchy.agent, org.omarchy.btop, org.omarchy.nvim and everything else omarchy-launch-tui names, org.omarchy.terminal from the menu, and TUI.float/TUI.tile from omarchy-tui-install. foot can also come up as org.codeberg.dnkl.foot. default/hypr/apps/terminals.lua tags all of these as terminals, but none of them match a scroll rule. They fall back to the global input:touchpad:scroll_factor, because a window's scroll_touchpad replaces that factor instead of multiplying it. On my machine, an agent window under foot scrolled at 0.25, the global factor, instead of 2.0.

As #9008 notes, one rule on the terminal tag can't fix this: the speeds are per terminal, and org.omarchy.agent doesn't say which terminal is behind it.

Change

The terminal does say which one it is, in the title it opens the window with. Its default title is foot, kitty, Alacritty or Ghostty, and Omarchy's own configs for these terminals don't set title. Hyprland keeps that as the window's initial title, which omarchy-hyprland-focus-app already relies on to find agent windows.

So each terminal's speed now goes to two rules: the existing class rule, and a rule for Omarchy's own terminal app-ids (org.omarchy.*, TUI.*) whose initial title is that terminal's. A small local helper applies both, so each speed still appears once. org.codeberg.dnkl.foot joins the foot rule.

Compared with #9049, this is config only. It survives hyprctl reload, adds no rule per launch, reaches the windows that don't go through omarchy-launch-tui (TUI.*, org.omarchy.terminal from the menu), and keeps the per-terminal values in one table.

Scope

These windows now scroll exactly like a plain window of the same terminal running the same program. #9049 discussed whether fullscreen TUIs on foot's alternate screen need a different speed. That question applies to plain terminal windows too and is separate, so this PR leaves it alone.

Not covered: windows opened with an explicit title. omarchy-launch-floating-terminal-with-presentation opens the installer and setup windows as org.omarchy.terminal with --title=Omarchy. Those keep the global factor, as they do today.

Verification

  • Live, on Hyprland 0.56.2 (Asahi, MacBook Air M1) with foot 1.28: I added a rule matching initial_title = "foot" with hyprctl eval, then opened foot windows under a test app-id. hyprctl getprop showed the rule applied to the window titled foot and not to ones opened with --title=Omarchy or --title=football, so the title is matched in full.
  • The other default titles come from each terminal's source: kitty's appname, Alacritty's DEFAULT_NAME, and Ghostty's "Ghostty" fallback when nothing has set a title. test/shell.d/hyprland-focus-app-test.sh already uses initialTitle: "kitty" for an agent window.
  • New test/shell.d/hyprland-terminal-scroll-test.sh loads input.lua with a stub hl, then resolves the speed for each window the way Hyprland does: the pattern must match the whole value, and the last matching rule wins. It fails on quattro and passes here.
  • ./test/all, run without a compositor so the compositor-gated tests skip. test/cli passes. In test/shell, 5 of 455 files fail, and none of them involve this change:
    • default-apps, elsewhen-migration and i18n fail the same way on a clean quattro. For i18n, da/menu.json still has system.reboot-boot-menu after Remove the Reboot to Boot Menu menu item #15795.
    • agent-account-copy and hyprland-startup-cursor failed only in the parallel run and pass on their own. agent-account-copy refused to run because it found the Claude session that was running the suite.

Fixes #9008

🤖 Generated with Claude Code

The per-terminal scroll_touchpad rules match on class, so windows Omarchy
opens under its own app-ids (org.omarchy.*, TUI.*) missed them and fell
back to the global touchpad scroll factor. Match those windows by the
initial title their terminal opens them with, so each gets the speed of
the terminal behind it, and add foot's org.codeberg.dnkl.foot app-id to
the foot rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Gives Omarchy terminal windows their terminal’s touchpad scroll speed.

  • Omarchy agent and TUI windows get the speed of their terminal.

Reviews (2) · Last reviewed commit: "Test that a partial title doesn't get a ..." · Reviewed by Greptile

The scroll test's only negative case was a window whose class matches no
rule, so it never checked the title half of the rule for Omarchy's own
app-ids. Add an agent window titled football, which must keep the global
touchpad speed: with the foot title loosened to a prefix, the other cases
still pass and this one fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 19, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 42cd8c9 against quattro (merge base a6dcc31), on a worker built from the Omarchy ISO with Hyprland 0.56.2. Nothing found that needs changing.

Reproduced, then fixed. With foot, kitty and Ghostty each set as the default terminal, I opened windows the way Omarchy does: omarchy-launch-tui --app-id=org.omarchy.agent, omarchy-launch-tui btop and nvim, and xdg-terminal-exec --app-id=TUI.float. Every one came up with the terminal's own name as its initialTitle (foot, kitty, Ghostty). On quattro's input.lua, hyprctl getprop gave all of them scroll_touchpad 0.4, the global factor, while a plain terminal window got its own speed. On this head they get 2, 1.5 and 0.2, matching the plain window of the same terminal. Putting quattro's input.lua back took them back to 0.4. Restoring this branch's file went through hyprctl reload, so the rules also survive a reload, unlike a rule added at launch time. With Alacritty, xdg-terminal-exec opened these windows under the plain Alacritty class, so the existing class rule already covers them.

Tests. ./test/cli passed on the worker. The new hyprland-terminal-scroll-test.sh passes here and fails against quattro's input.lua. The full test/shell suite has failures on this head, and every failing file also fails on a clean quattro on the same worker. The one that differed between runs, lock-appear-budget-test.sh, misses its timing budget on quattro too.

Second opinion. Codex Medium reviewed the diff at this head and found no defect in it. Independence is not guaranteed, because it can read this session's work. Its one finding is the case this description already lists as not covered: omarchy-launch-floating-terminal-with-presentation opens org.omarchy.terminal with --title=Omarchy, so those installer and setup windows keep the global speed. That is unchanged from today, and covering it is a separate design choice, so nothing was pushed.

Related. #9049 also fixes #9008, by adding a rule in omarchy-launch-tui when a TUI launches. This PR covers the cases that one misses: TUI.* windows from omarchy-tui-install and org.omarchy.terminal windows from the menu, which don't go through omarchy-launch-tui, and windows left open across a hyprctl reload. Codex Medium, asked separately to compare the two, reached the same conclusion. This one is linked to close #9008.

Waiting on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 20, 2026
@isc

isc commented Oct 20, 2026

Copy link
Copy Markdown
Author

Closing: 3ba58c6 on quattro landed the same fix.

@isc isc closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent windows (org.omarchy.agent) miss the terminal scroll_touchpad rule, making touchpad scrolling ~10x slower

2 participants