From 0911d6e64051b32cd16c20d927c72c74625b99cd Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 8 Dec 2025 16:57:08 +0300 Subject: Enha: switch tts on/off from ctrl+p --- props_table.go | 3 +++ tools.go | 54 +++++++++++++++++++++++++++--------------------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/props_table.go b/props_table.go index 448044c..7807522 100644 --- a/props_table.go +++ b/props_table.go @@ -121,6 +121,9 @@ func makePropsTable(props map[string]float32) *tview.Table { addCheckboxRow("Inject role", injectRole, func(checked bool) { injectRole = checked }) + addCheckboxRow("TTS Enabled", cfg.TTS_ENABLED, func(checked bool) { + cfg.TTS_ENABLED = checked + }) // Add dropdowns logLevels := []string{"Debug", "Info", "Warn"} addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) { diff --git a/tools.go b/tools.go index 8f2549a..47d0e01 100644 --- a/tools.go +++ b/tools.go @@ -772,34 +772,34 @@ func todoDelete(args map[string]string) []byte { func isCommandAllowed(command string) bool { allowedCommands := map[string]bool{ - "grep": true, - "sed": true, - "awk": true, - "find": true, - "cat": true, - "head": true, - "tail": true, - "sort": true, - "uniq": true, - "wc": true, - "ls": true, - "echo": true, - "cut": true, - "tr": true, - "cp": true, - "mv": true, - "rm": true, - "mkdir": true, - "rmdir": true, - "pwd": true, - "df": true, - "free": true, - "ps": true, - "top": true, - "du": true, + "grep": true, + "sed": true, + "awk": true, + "find": true, + "cat": true, + "head": true, + "tail": true, + "sort": true, + "uniq": true, + "wc": true, + "ls": true, + "echo": true, + "cut": true, + "tr": true, + "cp": true, + "mv": true, + "rm": true, + "mkdir": true, + "rmdir": true, + "pwd": true, + "df": true, + "free": true, + "ps": true, + "top": true, + "du": true, "whoami": true, - "date": true, - "uname": true, + "date": true, + "uname": true, } return allowedCommands[command] } -- cgit v1.2.3