Created
December 14, 2024 09:25
-
-
Save Antman261/3d1d3e5b95a9b40860c39854383288c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not tag: user.commander_active | |
- | |
commander$: user.set_silly_timeout() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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