aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorGris Ge <fge@redhat.com>2018-09-24 20:12:45 +0800
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-09-24 12:12:45 +0000
commita752066bfa281f236b8d171cbc8f6e5a5a940297 (patch)
tree55eeaac39f64e16fcf545639d89e14ce913741c9 /src/config.rs
parentcd79680ba23b3d9c22372c95fa53dec5b4ea7c8e (diff)
downloadalacritty-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.rs5
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
}
}
}