Module talon.app
from talon import appFunctions
| Name | Reference |
|---|---|
register | Register for an application event. |
unregister | Unregister a previously registered event: |
notify | Display a desktop notification, optionally playing a sound. |
Values
| Name | Reference |
|---|---|
platform | platform: str |
version | version: str |
branch | branch: str |
build | build: int |
Functions
Sourceregister§
def register(topic: str, cb: collections.abc.Callable) -> NoneRegister 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) -> NoneUnregister 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) -> NoneDisplay 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: strversion§
version: strbranch§
branch: strbuild§
build: int