Skip to content

Commit

Permalink
Added notepad application context (talonhub#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Jun 24, 2024
1 parent b337c21 commit 5a97058
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions apps/notepad/notepad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from talon import Context, Module, actions

ctx = Context()
mod = Module()

mod.apps.notepad = r"""
os: windows
and app.exe: notepad.exe
"""

ctx.matches = r"""
app: notepad
"""


@ctx.action_class("win")
class win_actions:
def filename():
filename = actions.win.title().split(" - ")[0]
if "." in filename:
return filename
return ""
5 changes: 5 additions & 0 deletions apps/notepad/notepad.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
app: notepad
-

tag(): user.tabs
tag(): user.find_and_replace

0 comments on commit 5a97058

Please sign in to comment.