macos: use system beep for bell (#9339)

This seems pretty straightforward. I've tested it and it does what I'd
expect it to do.

Fixes #9338
pull/9352/head
Dusk 2025-10-25 20:24:52 -07:00 committed by GitHub
parent fd969b53a5
commit 27b0978cd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -724,6 +724,10 @@ class AppDelegate: NSObject,
}
@objc private func ghosttyBellDidRing(_ notification: Notification) {
if (ghostty.config.bellFeatures.contains(.system)) {
NSSound.beep()
}
if (ghostty.config.bellFeatures.contains(.attention)) {
// Bounce the dock icon if we're not focused.
NSApp.requestUserAttention(.informationalRequest)

View File

@ -2646,7 +2646,9 @@ keybind: Keybinds = .{},
/// This could result in an audiovisual effect, a notification, or something
/// else entirely. Changing these effects require altering system settings:
/// for instance under the "Sound > Alert Sound" setting in GNOME,
/// or the "Accessibility > System Bell" settings in KDE Plasma. (GTK only)
/// or the "Accessibility > System Bell" settings in KDE Plasma.
///
/// On macOS, this plays the system alert sound.
///
/// * `audio`
///