From 29f8697a9fb6e4a1d1e51351b56abd79ede2b8de Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 22 Dec 2024 15:16:18 -0500 Subject: [PATCH] Fix missing method in default.py for scripts. --- src/cthulhu/scripts/default.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cthulhu/scripts/default.py b/src/cthulhu/scripts/default.py index f0607bf..2b119fa 100644 --- a/src/cthulhu/scripts/default.py +++ b/src/cthulhu/scripts/default.py @@ -737,6 +737,13 @@ class Script(script.Script): # # ######################################################################## + def toggleSleepMode(self, input_event=None): + """Toggles between sleep mode and regular mode.""" + script_manager = _scriptManager + sleepScript = script_manager.createScript("sleepmode", self.app) + script_manager.setActiveScript(sleepScript, "Sleep mode toggled") + return True + def bypassNextCommand(self, inputEvent=None): """Causes the next keyboard command to be ignored by Cthulhu and passed along to the current application.