Skip to content

Commit 7d3ab70

Browse files
committed
feat(clipcatd): allow clearing the history on startup
1 parent 80346a5 commit 7d3ab70

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clipcatd/src/config/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pub struct Config {
3232
#[serde(default = "Config::default_max_history")]
3333
pub max_history: usize,
3434

35+
#[serde(default)]
36+
pub clear_history_on_start: bool,
37+
3538
#[serde(default = "Config::default_synchronize_selection_with_clipboard")]
3639
pub synchronize_selection_with_clipboard: bool,
3740

@@ -67,6 +70,7 @@ impl Default for Config {
6770
pid_file: Self::default_pid_file_path(),
6871
primary_threshold_ms: Self::default_primary_threshold_ms(),
6972
max_history: Self::default_max_history(),
73+
clear_history_on_start: false,
7074
history_file_path: Self::default_history_file_path(),
7175
synchronize_selection_with_clipboard:
7276
Self::default_synchronize_selection_with_clipboard(),
@@ -208,6 +212,7 @@ impl From<Config> for clipcat_server::Config {
208212
grpc,
209213
primary_threshold_ms,
210214
max_history,
215+
clear_history_on_start,
211216
synchronize_selection_with_clipboard,
212217
history_file_path,
213218
watcher,
@@ -244,6 +249,7 @@ impl From<Config> for clipcat_server::Config {
244249
grpc_access_token,
245250
primary_threshold,
246251
max_history,
252+
clear_history_on_start,
247253
synchronize_selection_with_clipboard,
248254
history_file_path,
249255
watcher,

0 commit comments

Comments
 (0)