Split Warp config: Linux/Windows shortcuts in warp_win_linux.py, Mac in warp_mac.py#2192
Split Warp config: Linux/Windows shortcuts in warp_win_linux.py, Mac in warp_mac.py#2192flomillot wants to merge 4 commits intotalonhub:mainfrom
Conversation
…c.py
Adds support for Warp on Linux and Windows (previously only Mac). The
existing warp.py is moved to warp_mac.py and scoped with `os: mac` so
its Mac-specific actions (cmd-{n} tab jumps, alt-arrow word navigation)
no longer leak into other OSes. The new warp.py declares mod.apps.warp
for Linux (app.name) and Windows (app.name + app.exe per P04), and
overrides app.tab_open / app.tab_close (ctrl-shift-t / ctrl-shift-w)
plus user.tab_jump / user.tab_final (ctrl-{n}) to match Warp's
Linux/Windows defaults.
Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac69ca2d08
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| def tab_open(): | ||
| actions.key("ctrl-shift-t") | ||
|
|
||
| def tab_close(): | ||
| actions.key("ctrl-shift-w") |
There was a problem hiding this comment.
Scope Warp tab overrides off macOS
Because warp_mac.py still declares the warp app on macOS, this unscoped app: warp context also matches Mac Warp. The new app overrides therefore replace the macOS defaults (cmd-t / cmd-w) with ctrl-shift-t / ctrl-shift-w, so voice commands like tab open/close in Mac Warp will send the wrong shortcuts. Scope this context or these overrides to Windows/Linux only.
Useful? React with 👍 / 👎.
The previous unscoped `app: warp` matcher in warp.py also matched on macOS, where it would replace the Mac defaults (cmd-t / cmd-w) with the Linux/Windows shortcuts (ctrl-shift-t / ctrl-shift-w). Restrict the context to Linux and Windows by adding `os: linux` / `os: windows` clauses, following the pattern in firefox_win_linux.py and opera_win_linux.py. Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
…linux.py and opera_win_linux.py Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
|
@david-tejada for #1738 I don't find this condition convenient when we have more than nine tab. Can we change this ? |
Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
Summary
Adds support for Warp on Linux and Windows. Previously
apps/warp/warp.pyonly declaredmod.apps.warpfor macOS and held Mac-specific action overrides under an unscopedapp: warpmatcher.apps/warp/warp.py→apps/warp/warp_mac.pyand scopes its context withos: macso its Mac-specific actions (cmd-{n}tab jumps,alt-arrowword navigation) only apply on Mac.apps/warp/warp_win_linux.py(named for consistency withfirefox_win_linux.pyandopera_win_linux.py) declaringmod.apps.warpfor Linux (app.name: warp) and Windows (app.name: Warp+app.exe: warp.exe, per P04). Its context is scoped(os: linux OR os: windows) AND app: warpso its overrides do not leak onto macOS.app.tab_open/app.tab_close→ctrl-shift-t/ctrl-shift-wuser.tab_jump/user.tab_final→ctrl-{n}edit.word_left/edit.word_right→ctrl-left/ctrl-right