S or /

Module talon.app

from talon import app

Functions

NameReference
register

Register for an application event.

unregister

Unregister a previously registered event:

notify

Display a desktop notification, optionally playing a sound.

Values

NameReference
platformplatform: str
versionversion: str
branchbranch: str
buildbuild: int

Functions

Sourceregister§

def register(topic: str, cb: collections.abc.Callable) -> None

Register for an application event.

  • ready: Talon is ready. Your callback will be called after Talon launch and during script reloads.

  • launch: Talon launched. Your callback will only be called immediately after Talon launch.

  • startup: Talon launched during system startup.

from talon import app

def app_ready():
    print("Talon is ready")
app.register("ready", app_ready)

Sourceunregister§

def unregister(topic: Any, cb: collections.abc.Callable) -> None

Unregister a previously registered event:

app.unregister("ready", app_ready)

Sourcenotify§

def notify(title: str | None = None, subtitle: str | None = None, body: str | None = None, sound: bool = False) -> None

Display a desktop notification, optionally playing a sound.

from talon import app

app.notify(body="Hello world")
app.notify(title="Hello world",
           subtitle="Welcome to Talon",
           body="Enjoy your stay.",
           sound=True)

Values

platform§

platform: str

version§

version: str

branch§

branch: str

build§

build: int