diff options
author | Gris Ge <fge@redhat.com> | 2018-09-24 20:12:45 +0800 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-09-24 12:12:45 +0000 |
commit | a752066bfa281f236b8d171cbc8f6e5a5a940297 (patch) | |
tree | 55eeaac39f64e16fcf545639d89e14ce913741c9 /src/config.rs | |
parent | cd79680ba23b3d9c22372c95fa53dec5b4ea7c8e (diff) | |
download | alacritty-a752066bfa281f236b8d171cbc8f6e5a5a940297.tar.gz alacritty-a752066bfa281f236b8d171cbc8f6e5a5a940297.zip |
Allow copying selection to primary clipboard
A new configuration option `save_to_clipboard` has been added
to the `selection` section of the configuration. This allows writing
every selection to the primary system clipboard when it is set
to `true`.
On linux the selection is still written to the selection clipboard,
independent of the value of the `save_to_clipboard` setting.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index 42d65c91..66cf1a6f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -40,12 +40,15 @@ fn true_bool() -> bool { #[derive(Clone, Debug, Deserialize)] pub struct Selection { pub semantic_escape_chars: String, + #[serde(default, deserialize_with = "failure_default")] + pub save_to_clipboard: bool, } impl Default for Selection { fn default() -> Selection { Selection { - semantic_escape_chars: String::new() + semantic_escape_chars: String::new(), + save_to_clipboard: false } } } |