Skip to content

Commit

Permalink
Add Warp context action implementations (#1738)
Browse files Browse the repository at this point in the history
This makes possible using commands like `go tab three`, `go tab final`,
`go word left` or `go word right`.
  • Loading branch information
david-tejada authored Feb 7, 2025
1 parent 3d86b49 commit d198e99
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion apps/warp/warp.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
from talon import Module
from talon import Context, Module, actions

mod = Module()

mod.apps.warp = """
os: mac
and app.bundle: dev.warp.Warp-Stable
"""

ctx = Context()
ctx.matches = r"""
app: warp
"""


@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")


@ctx.action_class("edit")
class EditActions:
def word_left():
actions.key("alt-left")

def word_right():
actions.key("alt-right")

0 comments on commit d198e99

Please sign in to comment.