Second pass on updating settings, missed a few the first go round.

This commit is contained in:
Storm Dragon
2025-12-10 20:08:01 -05:00
parent 560ceb26c9
commit f4e28a246f
7 changed files with 35 additions and 33 deletions

View File

@@ -26,7 +26,7 @@ class command:
def run(self):
clipboard_file_path = self.env["runtime"][
"SettingsManager"
].get_setting("general", "clipboardExportPath")
].get_setting("general", "clipboard_export_path")
clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"]
)

View File

@@ -26,7 +26,7 @@ class command:
def run(self):
clipboard_file_path = self.env["runtime"][
"SettingsManager"
].get_setting("general", "clipboardExportPath")
].get_setting("general", "clipboard_export_path")
clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"]
)

View File

@@ -18,17 +18,17 @@ class command:
def initialize(self, environment):
self.env = environment
# Use commandBuffer like other commands
if "progressMonitoring" not in self.env["commandBuffer"]:
if "progress_monitoring" not in self.env["commandBuffer"]:
# Check if progress monitoring should be enabled by default from
# settings
try:
default_enabled = self.env["runtime"][
"SettingsManager"
].get_setting_as_bool("sound", "progressMonitoring")
].get_setting_as_bool("sound", "progress_monitoring")
except Exception as e:
# If setting doesn't exist, default to False
default_enabled = False
self.env["commandBuffer"]["progressMonitoring"] = default_enabled
self.env["commandBuffer"]["progress_monitoring"] = default_enabled
self.env["commandBuffer"]["lastProgressTime"] = 0
self.env["commandBuffer"]["lastProgressValue"] = -1
@@ -40,12 +40,12 @@ class command:
def run(self):
# Check if commandBuffer exists
if "progressMonitoring" not in self.env["commandBuffer"]:
self.env["commandBuffer"]["progressMonitoring"] = False
if "progress_monitoring" not in self.env["commandBuffer"]:
self.env["commandBuffer"]["progress_monitoring"] = False
self.env["commandBuffer"]["lastProgressTime"] = 0
self.env["commandBuffer"]["lastProgressValue"] = -1
if self.env["commandBuffer"]["progressMonitoring"]:
if self.env["commandBuffer"]["progress_monitoring"]:
self.stop_progress_monitoring()
self.env["runtime"]["OutputManager"].present_text(
_("Progress monitoring disabled"), interrupt=True
@@ -57,17 +57,17 @@ class command:
)
def start_progress_monitoring(self):
self.env["commandBuffer"]["progressMonitoring"] = True
self.env["commandBuffer"]["progress_monitoring"] = True
self.env["commandBuffer"]["lastProgressTime"] = time.time()
self.env["commandBuffer"]["lastProgressValue"] = -1
# Don't control speech - let user decide with silence_until_prompt
def stop_progress_monitoring(self):
self.env["commandBuffer"]["progressMonitoring"] = False
self.env["commandBuffer"]["progress_monitoring"] = False
# Don't control speech - progress monitor is beep-only
def detect_progress(self, text):
if not self.env["commandBuffer"]["progressMonitoring"]:
if not self.env["commandBuffer"]["progress_monitoring"]:
return
# Skip progress detection if current screen looks like a prompt

View File

@@ -25,8 +25,8 @@ class command:
# Only run if progress monitoring is enabled
try:
if (
"progressMonitoring" in self.env["commandBuffer"]
and self.env["commandBuffer"]["progressMonitoring"]
"progress_monitoring" in self.env["commandBuffer"]
and self.env["commandBuffer"]["progress_monitoring"]
):
# Check if current line is a prompt - if so, reset progress
# state

View File

@@ -309,7 +309,7 @@ class RemoteManager:
def export_clipboard(self):
clipboard_file_path = self.env["runtime"][
"SettingsManager"
].get_setting("general", "clipboardExportPath")
].get_setting("general", "clipboard_export_path")
clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"]
)

View File

@@ -14,6 +14,7 @@ settings_data = {
"volume": 1.0,
"generic_play_file_command": "play -q -v fenrirVolume fenrirSoundFile",
"generic_frequency_command": "play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence",
"progress_monitoring": True,
},
"speech": {
"enabled": True,
@@ -53,6 +54,7 @@ settings_data = {
"replace_undefined_punctuation_with_space": True,
"new_line_pause": True,
"number_of_clipboards": 10,
"clipboard_export_path": "/tmp/fenrirClipboard",
"emoticons": True,
"fenrir_keys": "KEY_KP0,KEY_META",
"script_keys": "KEY_COMPOSE",