Last active
January 23, 2021 18:38
-
-
Save rntz/2d66fd4adca308b3c3ea05686c1e011a to your computer and use it in GitHub Desktop.
sleep or wake
This file contains 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
@mod.action_class | |
class Actions: | |
def welcome_back(): | |
"Wakes talon up." | |
logging.info("Waking Talon up.") | |
actions.user.mouse_wake() | |
actions.user.history_enable() | |
actions.user.talon_mode() | |
def sleep_all(): | |
"Sends talon to sleep." | |
logging.info("Sending Talon to sleep.") | |
actions.user.switcher_hide_running() | |
actions.user.history_disable() | |
actions.user.homophones_hide() | |
actions.user.help_hide() | |
actions.user.mouse_sleep() | |
actions.speech.disable() | |
#actions.user.engine_sleep() | |
def sleep_or_wake(): | |
"Sleeps talon if it is waking or wakes it if it is sleeping." | |
if actions.speech.enabled(): | |
actions.user.sleep_all() | |
else: | |
actions.user.welcome_back() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment