Ported over Orca d-bus remote improvements.
This commit is contained in:
@@ -330,6 +330,215 @@ If you get "The name is not activatable" or similar errors:
|
||||
- **Permissions**: Ensure you're using `--user` with busctl/gdbus for session bus access.
|
||||
- **Display**: Make sure `DISPLAY=:0` is set when running Cthulhu in terminal sessions.
|
||||
|
||||
## Speech and Key Echo Control Examples
|
||||
|
||||
### SpeechManager Module
|
||||
|
||||
The SpeechManager module provides comprehensive control over Cthulhu's speech settings:
|
||||
|
||||
#### Speech Muting
|
||||
```bash
|
||||
# Check if speech is muted
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeGetter s "SpeechIsMuted"
|
||||
|
||||
# Mute speech
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpeechIsMuted" b true
|
||||
|
||||
# Unmute speech
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpeechIsMuted" b false
|
||||
```
|
||||
|
||||
#### Verbosity Control
|
||||
```bash
|
||||
# Get current verbosity level
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeGetter s "VerbosityLevel"
|
||||
|
||||
# Set verbosity to brief
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "VerbosityLevel" s "brief"
|
||||
|
||||
# Set verbosity to verbose
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "VerbosityLevel" s "verbose"
|
||||
```
|
||||
|
||||
#### Punctuation Control
|
||||
```bash
|
||||
# Get current punctuation level
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeGetter s "PunctuationLevel"
|
||||
|
||||
# Set punctuation level (none/some/most/all)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "PunctuationLevel" s "all"
|
||||
```
|
||||
|
||||
#### Other Speech Settings
|
||||
```bash
|
||||
# Number pronunciation
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpeakNumbersAsDigits" b true
|
||||
|
||||
# Capitalization style (none/icon/spell)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "CapitalizationStyle" s "spell"
|
||||
|
||||
# Indentation and justification speech
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpeakIndentationAndJustification" b true
|
||||
|
||||
# Display-only text mode
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "OnlySpeakDisplayedText" b false
|
||||
```
|
||||
|
||||
### TypingEchoManager Module
|
||||
|
||||
The TypingEchoManager module provides granular control over key echo and typing feedback:
|
||||
|
||||
#### Master Key Echo Control
|
||||
```bash
|
||||
# Check if key echo is enabled
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeGetter s "KeyEchoEnabled"
|
||||
|
||||
# Enable key echo
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "KeyEchoEnabled" b true
|
||||
|
||||
# Disable key echo
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "KeyEchoEnabled" b false
|
||||
```
|
||||
|
||||
#### Character, Word, and Sentence Echo
|
||||
```bash
|
||||
# Character echo (echo characters as they're typed)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "CharacterEchoEnabled" b true
|
||||
|
||||
# Word echo (speak word when completed)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "WordEchoEnabled" b true
|
||||
|
||||
# Sentence echo (speak sentence when completed)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SentenceEchoEnabled" b false
|
||||
```
|
||||
|
||||
#### Key Type Controls
|
||||
```bash
|
||||
# Alphabetic keys (a-z, A-Z)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "AlphabeticKeysEnabled" b true
|
||||
|
||||
# Numeric keys (0-9)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "NumericKeysEnabled" b true
|
||||
|
||||
# Punctuation keys (!@#$%^&*(),.;' etc.)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "PunctuationKeysEnabled" b true
|
||||
|
||||
# Space key
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpaceEnabled" b true
|
||||
|
||||
# Modifier keys (Ctrl, Alt, Shift, etc.)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "ModifierKeysEnabled" b false
|
||||
|
||||
# Function keys (F1-F12)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "FunctionKeysEnabled" b true
|
||||
|
||||
# Action keys (Enter, Tab, Backspace, Delete, Escape)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "ActionKeysEnabled" b true
|
||||
|
||||
# Navigation keys (Arrow keys, Home, End, Page Up/Down)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "NavigationKeysEnabled" b false
|
||||
|
||||
# Diacritical keys (accented characters)
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "DiacriticalKeysEnabled" b true
|
||||
```
|
||||
|
||||
### Complete Automation Script Example
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# Complete Cthulhu Speech and Key Echo Configuration via D-Bus
|
||||
|
||||
echo "=== Configuring Cthulhu via D-Bus ==="
|
||||
|
||||
# Speech Configuration
|
||||
echo "Setting up speech preferences..."
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "VerbosityLevel" s "brief"
|
||||
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "PunctuationLevel" s "some"
|
||||
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/SpeechManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "SpeakNumbersAsDigits" b true
|
||||
|
||||
# Key Echo Configuration
|
||||
echo "Setting up key echo preferences..."
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "KeyEchoEnabled" b true
|
||||
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "AlphabeticKeysEnabled" b true
|
||||
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "NumericKeysEnabled" b true
|
||||
|
||||
busctl --user call org.stormux.Cthulhu.Service \
|
||||
/org/stormux/Cthulhu/Service/TypingEchoManager \
|
||||
org.stormux.Cthulhu.Module ExecuteRuntimeSetter sv "ModifierKeysEnabled" b false
|
||||
|
||||
echo "Configuration complete!"
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Quick Test Script
|
||||
|
Reference in New Issue
Block a user