Skip to content

Split Warp config: Linux/Windows shortcuts in warp_win_linux.py, Mac in warp_mac.py#2192

Open
flomillot wants to merge 4 commits intotalonhub:mainfrom
flomillot:warp-linux-windows-support
Open

Split Warp config: Linux/Windows shortcuts in warp_win_linux.py, Mac in warp_mac.py#2192
flomillot wants to merge 4 commits intotalonhub:mainfrom
flomillot:warp-linux-windows-support

Conversation

@flomillot
Copy link
Copy Markdown

@flomillot flomillot commented May 10, 2026

Summary

Adds support for Warp on Linux and Windows. Previously apps/warp/warp.py only declared mod.apps.warp for macOS and held Mac-specific action overrides under an unscoped app: warp matcher.

  • Renames apps/warp/warp.pyapps/warp/warp_mac.py and scopes its context with os: mac so its Mac-specific actions (cmd-{n} tab jumps, alt-arrow word navigation) only apply on Mac.
  • Adds apps/warp/warp_win_linux.py (named for consistency with firefox_win_linux.py and opera_win_linux.py) declaring mod.apps.warp for 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: warp so its overrides do not leak onto macOS.
  • Overrides matching Warp's Linux/Windows defaults:
    • app.tab_open / app.tab_closectrl-shift-t / ctrl-shift-w
    • user.tab_jump / user.tab_finalctrl-{n}
    • edit.word_left / edit.word_rightctrl-left / ctrl-right

…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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +23 to +27
def tab_open():
actions.key("ctrl-shift-t")

def tab_close():
actions.key("ctrl-shift-w")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

flomillot added 2 commits May 10, 2026 15:00
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>
@flomillot flomillot changed the title Split Warp config: Linux/Windows shortcuts in warp.py, Mac in warp_mac.py Split Warp config: Linux/Windows shortcuts in warp_win_linux.py, Mac in warp_mac.py May 10, 2026
@flomillot
Copy link
Copy Markdown
Author

flomillot commented May 10, 2026

@david-tejada for #1738

I don't find this condition convenient when we have more than nine tab.

@ctx.action_class("user")
class UserActions:
    def tab_jump(number: int):
        if number < 9:
            actions.key(f"cmd-{number}")

    def tab_final():
        actions.key("cmd-9")

Can we change this ?

Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant