Specify an audio file for the audible bell #11543

Open
opened 2026-01-31 02:50:40 +00:00 by claunia · 0 comments
Owner

Originally created by @KalleOlaviNiemitalo on GitHub (Nov 22, 2020).

Description of the new feature/enhancement

Please let me configure the audible bell so that it plays a sound other than "Critical Stop". I'd like to select a sound with a shorter duration and perhaps lower volume.

This request is for Windows Terminal, not the console host.

Proposed technical implementation details (optional)

Ever since https://github.com/microsoft/terminal/pull/7679, the implementation of the audible bell hardcodes SND_ALIAS_SYSTEMHAND: https://github.com/microsoft/terminal/blob/67dfbd21a6b37025ebc0cc435c2ddf791e32811a/src/cascadia/TerminalApp/Pane.cpp#L373-L374

I can think of two ways to make this configurable:

  • Let me specify the path of a sound file in settings.json. I think this should be configurable per profile, like the bellStyle setting (https://github.com/microsoft/terminal/issues/2360) is.

  • Alternatively, register Windows Terminal with the "Change system sounds" feature in Control Panel so that I can choose a sound there. According to C++ at Work: Web Version Checking, Adding Sound to an App, this involves the HKEY_CURRENT_USER\AppEvents\Schemes\Apps Registry key and the SND_APPLICATION flag. I suspect that the MSIX packaging of Windows Terminal won't allow writing to such Registry keys, though.

Originally created by @KalleOlaviNiemitalo on GitHub (Nov 22, 2020). # Description of the new feature/enhancement Please let me configure the audible bell so that it plays a sound other than "Critical Stop". I'd like to select a sound with a shorter duration and perhaps lower volume. This request is for Windows Terminal, not the console host. # Proposed technical implementation details (optional) Ever since <https://github.com/microsoft/terminal/pull/7679>, the implementation of the audible bell hardcodes SND_ALIAS_SYSTEMHAND: <https://github.com/microsoft/terminal/blob/67dfbd21a6b37025ebc0cc435c2ddf791e32811a/src/cascadia/TerminalApp/Pane.cpp#L373-L374> I can think of two ways to make this configurable: * Let me specify the path of a sound file in settings.json. I think this should be configurable per profile, like the bellStyle setting (<https://github.com/microsoft/terminal/issues/2360>) is. * Alternatively, register Windows Terminal with the "Change system sounds" feature in Control Panel so that I can choose a sound there. According to [C++ at Work: Web Version Checking, Adding Sound to an App](https://docs.microsoft.com/en-us/archive/msdn-magazine/2006/may/c-at-work-web-version-checking-adding-sound-to-an-app), this involves the HKEY_CURRENT_USER\AppEvents\Schemes\Apps Registry key and the SND_APPLICATION flag. I suspect that the MSIX packaging of Windows Terminal won't allow writing to such Registry keys, though.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11543