mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-04 19:04:53 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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`
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user