Skip to content

keshavjha018/code_chorus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Chorus

A lightweight Visual Studio Code extension that enhances your coding experience by playing custom audio alerts for various terminal and testing events. Never miss a failed build or a completed long-running task again!

Features

This extension monitors your VS Code environment and can play specific audio .wav files based on the following triggers:

  • Terminal Open: Plays a sound when a new integrated terminal session is started.
  • Terminal Close: Plays a sound when an integrated terminal session ends.
  • Command/Task Success: Plays a sound when a terminal shell command (like npm run build or npm test) or a defined Task watcher successfully completes with an exit code of 0.
  • Command/Task Error: Plays a warning sound when a terminal command or a defined Task fails with a non-zero exit code.

Note: Audio playback is completely native and relies on the OS (powershell on Windows, afplay on macOS, aplay/paplay on Linux). There are no heavy third-party audio dependencies!

Extension Settings

This extension contributes the following settings that can be customized in your VS Code settings under Audio Alerts:

  • audioAlerts.enabled: Enable/disable this extension entirely. (Default: true)
  • audioAlerts.playOn.success: Play the success.wav sound on command/task success. (Default: true)
  • audioAlerts.playOn.error: Play the error.wav sound on command/task error. (Default: true)
  • audioAlerts.playOn.terminalOpen: Play the terminal-open.wav sound when a terminal starts. (Default: false)
  • audioAlerts.playOn.terminalClose: Play the terminal-close.wav sound when a terminal closes. (Default: false)

Setup / Development

If you're cloning this repository and want to hack on it locally or update the project context:

  1. Install Dependencies: Run npm install to grab the TypeScript definitions and compiler dependencies.
  2. Compile the Extension: Run npm run compile to build the TypeScript files into the out/ directory, or use npm run watch to recompile automatically on save.
  3. Audio Configuration: The actual .wav files need to be placed inside the assets/ directory at the root of the project.
    • assets/success.wav
    • assets/error.wav
    • assets/terminal-open.wav
    • assets/terminal-close.wav
  4. Testing Locally: Press F5 in VS Code to launch the Extension Development Host window with the extension loaded.

Packaging for Distribution

To share this extension with others or install it manually via .vsix:

  1. Ensure you have vsce installed globally: npm install -g @vscode/vsce.
  2. Run vsce package in the repository root.
  3. A .vsix file will be generated. You can install this file in VS Code by navigating to the Extensions view -> ... context menu -> Install from VSIX....

About

Extension for VS Code

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors