config: rename adw-toasts to app-notifications

There is no `renamed` entry for this because this was never part of a
released version of Ghostty. This is not considered a break change.

Fixes #4460
This commit is contained in:
Mitchell Hashimoto
2025-01-23 15:41:00 -08:00
parent 0c24da1412
commit 5327646d58
2 changed files with 28 additions and 26 deletions

View File

@ -1133,7 +1133,7 @@ pub fn setClipboardString(
c.gdk_clipboard_set_text(clipboard, val.ptr);
// We only toast if we are copying to the standard clipboard.
if (clipboard_type == .standard and
self.app.config.@"adw-toast".@"clipboard-copy")
self.app.config.@"app-notifications".@"clipboard-copy")
{
if (self.container.window()) |window|
window.sendToast("Copied to clipboard");

View File

@ -1771,6 +1771,31 @@ keybind: Keybinds = .{},
/// open terminals.
@"custom-shader-animation": CustomShaderAnimation = .true,
/// Control the in-app notifications that Ghostty shows.
///
/// On Linux (GTK) with Adwaita, in-app notifications show up as toasts. Toasts
/// appear overlaid on top of the terminal window. They are used to show
/// information that is not critical but may be important.
///
/// Possible notifications are:
///
/// - `clipboard-copy` (default: true) - Show a notification when text is copied
/// to the clipboard.
///
/// To specify a notification to enable, specify the name of the notification.
/// To specify a notification to disable, prefix the name with `no-`. For
/// example, to disable `clipboard-copy`, set this configuration to
/// `no-clipboard-copy`. To enable it, set this configuration to `clipboard-copy`.
///
/// Multiple notifications can be enabled or disabled by separating them
/// with a comma.
///
/// A value of "false" will disable all notifications. A value of "true" will
/// enable all notifications.
///
/// This configuration only applies to GTK with Adwaita enabled.
@"app-notifications": AppNotifications = .{},
/// If anything other than false, fullscreen mode on macOS will not use the
/// native fullscreen, but make the window fullscreen without animations and
/// using a new space. It's faster than the native fullscreen mode since it
@ -2121,29 +2146,6 @@ keybind: Keybinds = .{},
/// Changing this value at runtime will only affect new windows.
@"adw-toolbar-style": AdwToolbarStyle = .raised,
/// Control the toasts that Ghostty shows. Toasts are small notifications
/// that appear overlaid on top of the terminal window. They are used to
/// show information that is not critical but may be important.
///
/// Possible toasts are:
///
/// - `clipboard-copy` (default: true) - Show a toast when text is copied
/// to the clipboard.
///
/// To specify a toast to enable, specify the name of the toast. To specify
/// a toast to disable, prefix the name with `no-`. For example, to disable
/// the clipboard-copy toast, set this configuration to `no-clipboard-copy`.
/// To enable the clipboard-copy toast, set this configuration to
/// `clipboard-copy`.
///
/// Multiple toasts can be enabled or disabled by separating them with a comma.
///
/// A value of "false" will disable all toasts. A value of "true" will
/// enable all toasts.
///
/// This configuration only applies to GTK with Adwaita enabled.
@"adw-toast": AdwToast = .{},
/// If `true` (default), then the Ghostty GTK tabs will be "wide." Wide tabs
/// are the new typical Gnome style where tabs fill their available space.
/// If you set this to `false` then tabs will only take up space they need,
@ -5745,8 +5747,8 @@ pub const AdwToolbarStyle = enum {
@"raised-border",
};
/// See adw-toast
pub const AdwToast = packed struct {
/// See app-notifications
pub const AppNotifications = packed struct {
@"clipboard-copy": bool = true,
};