Skip to content

Instantly share code, notes, and snippets.

@Antman261
Created December 14, 2024 09:25
Show Gist options
  • Save Antman261/3d1d3e5b95a9b40860c39854383288c2 to your computer and use it in GitHub Desktop.
Save Antman261/3d1d3e5b95a9b40860c39854383288c2 to your computer and use it in GitHub Desktop.
from talon import Module, Context
mod = Module()
mod.tag(
"commander_active",
desc="Sets an extremely long speech timeout, reset with popping noise or spacebar",
)
ctx = Context()
@mod.action_class
class Actions:
def set_silly_timeout():
"""Sets a very long timeout"""
ctx.tags = ["user.commander_active"]
def reset_timeout():
"""Resets speech time out to previous value"""
ctx.tags = []
not tag: user.commander_active
-
commander$: user.set_silly_timeout()
tag: user.commander_active
mode: command
-
parrot(pop): user.reset_timeout()
key(space): user.reset_timeout()
settings():
speech.timeout = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment