mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
config: Add the option toast_on_clipboard_copy
(#4185)
Add a config option to enable/disable the toast shown on clipboard copy Also suggested in https://github.com/ghostty-org/ghostty/discussions/4165
This commit is contained in:
@ -894,7 +894,9 @@ fn gtkActionCopy(
|
||||
return;
|
||||
};
|
||||
|
||||
self.sendToast("Copied to clipboard");
|
||||
if (self.app.config.@"adw-toast".@"clipboard-copy") {
|
||||
self.sendToast("Copied to clipboard");
|
||||
}
|
||||
}
|
||||
|
||||
fn gtkActionPaste(
|
||||
|
@ -1951,6 +1951,22 @@ 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.
|
||||
///
|
||||
/// Valid values are:
|
||||
///
|
||||
/// - `clipboard-copy` (default: true) - Show a toast when text is copied
|
||||
/// to the clipboard.
|
||||
///
|
||||
/// You can prefix any value with `no-` to disable it. For example,
|
||||
/// `no-clipboard-copy` will disable the clipboard copy toast. Multiple
|
||||
/// values can be set by separating them with commas.
|
||||
///
|
||||
/// 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,
|
||||
@ -5451,6 +5467,11 @@ pub const AdwToolbarStyle = enum {
|
||||
@"raised-border",
|
||||
};
|
||||
|
||||
/// See adw-toast
|
||||
pub const AdwToast = packed struct {
|
||||
@"clipboard-copy": bool = true,
|
||||
};
|
||||
|
||||
/// See mouse-shift-capture
|
||||
pub const MouseShiftCapture = enum {
|
||||
false,
|
||||
|
Reference in New Issue
Block a user