Files
cthulhu/REMOTE-CONTROLLER-COMMANDS.md
2025-12-09 09:09:42 -05:00

92 lines
3.5 KiB
Markdown

# Cthulhu Remote Controller - Available Commands
This document lists the currently available D-Bus commands in Cthulhu's Remote Controller interface.
> **Note**: This is a work-in-progress. As more modules are exposed via D-Bus, this document will be expanded. Eventually this will be auto-generated using `tools/generate_dbus_documentation.py`.
## Service-Level Commands
Available on the main service object `/org/stormux/Cthulhu/Service`:
### Service Commands
| Command | Description | Parameters | Returns |
|---------|-------------|------------|---------|
| `GetVersion` | Returns Cthulhu's version string | None | String (version + revision) |
| `PresentMessage` | Present a message via speech/braille | `message` (string) | Boolean (success) |
| `ShowPreferences` | Opens Cthulhu's preferences GUI | None | Boolean (success) |
| `Quit` | Exits Cthulhu | None | Boolean (accepted) |
| `ListCommands` | Lists available service commands | None | List of (name, description) tuples |
| `ListModules` | Lists registered D-Bus modules | None | List of module names |
### Example Usage
```bash
# Get Cthulhu version
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service GetVersion
# Present a custom message
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service PresentMessage s "Hello from D-Bus"
# List available commands
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service ListCommands
# List registered modules
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service ListModules
# Open preferences
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service ShowPreferences
# Quit Cthulhu
busctl --user call org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service \
org.stormux.Cthulhu.Service Quit
```
## Module-Level Commands
Currently, no additional modules are exposed via D-Bus beyond the base service commands.
**Planned modules** (to be implemented):
- `SpeechAndVerbosityManager` - Speech settings control (muting, verbosity, punctuation, etc.)
- `TypingEchoManager` - Typing echo settings (character/word/sentence echo)
- `DefaultScript` - Core Cthulhu commands
- Additional navigation and presenter modules
See [README-REMOTE-CONTROLLER.md](README-REMOTE-CONTROLLER.md) for comprehensive D-Bus API documentation and usage examples.
## Verifying D-Bus Service Status
```bash
# Check if Cthulhu's D-Bus service is running
busctl --user list | grep Cthulhu
# Introspect the service to see all available methods
busctl --user introspect org.stormux.Cthulhu.Service /org/stormux/Cthulhu/Service
# Get detailed service information
busctl --user status org.stormux.Cthulhu.Service
```
## Contributing
To add new D-Bus-accessible functionality:
1. Add `@dbus_service.command`, `@dbus_service.getter`, or `@dbus_service.setter` decorators to methods
2. Register the module with the D-Bus service in `src/cthulhu/cthulhu.py`
3. Rebuild and test with busctl
4. Update this documentation (or regenerate using `tools/generate_dbus_documentation.py` when available)
## Desktop Environment Compatibility
Cthulhu's D-Bus Remote Controller is desktop-agnostic and works across all Linux desktop environments:
- GNOME, KDE Plasma, XFCE, LXDE
- Tiling window managers (i3, Sway, bspwm, etc.)
- Any environment with D-Bus session bus support
The service uses only standard D-Bus infrastructure with no desktop-specific dependencies.