then field in your configuration. This is useful for audio feedback in addition to or instead of desktop notifications.
How it works
Thethen field accepts an array of commands that run automatically when a session ends. Each command is specified as an array of strings, where the first element is the executable and subsequent elements are arguments.
Commands in the
then field run in parallel with desktop notifications and have a 5-second timeout (defined in actions/actions.go:15).Platform-specific examples
Different operating systems use different audio players. Here are the recommended commands for each platform:Text-to-speech examples
You can also use text-to-speech commands for spoken notifications:Complete configuration example
Hereβs a full example combining sound notifications with desktop notifications:Command timeout behavior
The timeout is enforced by the context system inactions/actions.go:69. This prevents hung processes from blocking the application.
Auto-cancellation
Commands are automatically cancelled when you start the next session. This is handled through Goβs context cancellation mechanism:User starts next session
If you start the next session before commands finish, they receive a cancellation signal
Troubleshooting
Sound doesn't play
Sound doesn't play
Check the audio player is installed:Verify the audio file path:
- Use absolute paths or
~/for home directory - Ensure the file exists and is a valid audio format
- Test the command manually in your terminal first
Command times out
Command times out
If your audio file is longer than 5 seconds, it will be cut off. Solutions:
- Use shorter audio files (under 5 seconds)
- The timeout is hardcoded in
actions/actions.go:15and cannot be configured
Command syntax errors
Command syntax errors
Common mistakes:
Related topics
- Custom commands - Learn about advanced command automation
- Configuration overview - Full configuration reference
- Notifications - Desktop notification setup