-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
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 #7679, the implementation of the audible bell hardcodes SND_ALIAS_SYSTEMHAND:
terminal/src/cascadia/TerminalApp/Pane.cpp
Lines 373 to 374 in 67dfbd2
| const auto soundAlias = reinterpret_cast<LPCTSTR>(SND_ALIAS_SYSTEMHAND); | |
| PlaySound(soundAlias, NULL, SND_ALIAS_ID | SND_ASYNC | SND_SENTRY); |
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 (Feature Request: disable bell #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.