config: Add the option toast_on_clipboard_copy

Add a config option to enable/disable the toast shown on clipboard copy
This commit is contained in:
Yotam Gurfinkel
2024-12-31 14:43:26 +02:00
committed by Mitchell Hashimoto
parent 5293e8a819
commit e6bb1a56eb
2 changed files with 6 additions and 1 deletions

View File

@ -894,8 +894,10 @@ fn gtkActionCopy(
return;
};
if (self.app.config.@"toast-on-clipboard-copy") {
self.sendToast("Copied to clipboard");
}
}
fn gtkActionPaste(
_: *c.GSimpleAction,

View File

@ -1276,6 +1276,9 @@ keybind: Keybinds = .{},
@"clipboard-read": ClipboardAccess = .ask,
@"clipboard-write": ClipboardAccess = .allow,
/// Enables or disables the toast message on a clipboard copy action.
@"toast-on-clipboard-copy": bool = true,
/// Trims trailing whitespace on data that is copied to the clipboard. This does
/// not affect data sent to the clipboard via `clipboard-write`.
@"clipboard-trim-trailing-spaces": bool = true,