dotfiles/talon/community/community-cursorless-0.4.0/code/engine.py
2024-11-16 20:27:38 -07:00

19 lines
434 B
Python

from talon import Context, Module
from talon import speech_system
mod = Module()
@mod.action_class
class Actions:
def engine_sleep():
"""Sleep the engine"""
speech_system.engine_mimic("go to sleep"),
def engine_wake():
"""Wake the engine"""
speech_system.engine_mimic("wake up"),
def engine_mimic(cmd: str):
"""Sends phrase to engine"""
speech_system.engine_mimic(cmd)