Skip to content

debosmithoney/Faaaah-error-sound

Repository files navigation

Faaaah Error Sound

Play a sound when integrated terminal commands fail or terminal output matches an error pattern.

Features

  • Detects non-zero exit codes from integrated terminal commands.
  • Uses shell execution events when available, with terminal close fallback.
  • Detects error-like terminal text with configurable regex.
  • Runs platform-specific sound command (macOS/Linux/Windows).
  • Falls back to terminal bell (\a) if sound command fails.
  • Includes cooldown to prevent noisy repeat alerts.
  • Includes a command palette action to test sound playback.

Extension Settings

This extension contributes the following settings:

  • terminalErrorSound.enabled (boolean)
  • terminalErrorSound.matchTerminalText (boolean)
  • terminalErrorSound.pattern (string regex)
  • terminalErrorSound.cooldownMs (number)
  • terminalErrorSound.soundFile (string)
  • terminalErrorSound.soundCommand.macos (string)
  • terminalErrorSound.soundCommand.linux (string)
  • terminalErrorSound.soundCommand.windows (string)

Run Faaaah Error Sound: Test Sound from the command palette to verify audio setup instantly.

Add Your Own Audio

You have two options:

  1. Put your file in the extension folder, for example media/error.wav, then set:
"terminalErrorSound.soundFile": "media/error.wav"
  1. Use an absolute path:
"terminalErrorSound.soundFile": "/Users/you/sounds/error.wav"

When soundFile is set, the extension auto-builds the correct command for your OS. If you want full control, set terminalErrorSound.soundCommand.<os> and include {soundFile} in it.

Development

npm install
npm run compile

Press F5 in VS Code to run an Extension Development Host.

Package

npm install
npm run package

This generates a .vsix file in the project root.

Publish to VS Code Marketplace

  1. Update publisher in package.json to your Marketplace publisher ID.
  2. Bump the extension version.
  3. Create a Personal Access Token in Azure DevOps for Marketplace publishing.
  4. Login and publish:
npx vsce login <your-publisher-name>
npm run publish

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors