diff --git a/README.md b/README.md index c2e8495d..af18721a 100644 --- a/README.md +++ b/README.md @@ -327,7 +327,7 @@ Config option 'skip_file' = ~*|.~*|*.tmp Config option 'skip_dotfiles' = false Config option 'skip_symlinks' = false Config option 'monitor_interval' = 45 -Config option 'min_notif_changes' = 5 +Config option 'min_notify_changes' = 5 Config option 'log_dir' = /var/log/onedrive/ Selective sync configured = false ``` @@ -521,8 +521,8 @@ Example: `monitor_interval = "300"` The monitor interval is defined as the wait time 'between' sync's when running in monitor mode. By default without configuration, the monitor_interval is set to 45 seconds. Setting this value to 300 will run the sync process every 5 minutes. -### min_notif_changes -Example: `min_notif_changes = "5"` +### min_notify_changes +Example: `min_notify_changes = "5"` This option defines the minimum number of pending incoming changes necessary to trigger a desktop notification. This allows controlling the frequency of notifications. diff --git a/config b/config index b44ef672..17bc1299 100644 --- a/config +++ b/config @@ -25,6 +25,6 @@ # skip_dotfiles = "false" # dry_run = "false" # monitor_interval = "45" -# min_notif_changes = "5" +# min_notify_changes = "5" # monitor_log_frequency = "5" # monitor_fullscan_frequency = "10" diff --git a/onedrive.1.in b/onedrive.1.in index f96b9002..34e00642 100644 --- a/onedrive.1.in +++ b/onedrive.1.in @@ -98,7 +98,7 @@ Configuration file key: \fBlog_dir\fP (default: \fB/var/log/onedrive/\fP) the minimum number of pending incoming changes necessary to trigger a desktop notification .br -Configuration file key: \fBmin_notif_changes\fP (default: \fB5\fP) +Configuration file key: \fBmin_notify_changes\fP (default: \fB5\fP) .TP \fB\-m \-\-monitor\fP Keep monitoring for local and remote changes diff --git a/src/config.d b/src/config.d index cbbade9c..2e430310 100644 --- a/src/config.d +++ b/src/config.d @@ -48,7 +48,7 @@ final class Config boolValues["dry_run"] = false; longValues["verbose"] = log.verbose; // might be initialized by the first getopt call! longValues["monitor_interval"] = 45, - longValues["min_notif_changes"] = 5; + longValues["min_notify_changes"] = 5; longValues["monitor_log_frequency"] = 5; // Number of n sync runs before performing a full local scan of sync_dir // By default 10 which means every ~7.5 minutes a full disk scan of sync_dir will occur @@ -220,7 +220,7 @@ final class Config &boolValues["logout"], "min-notif-changes", "Minimum number of pending incoming changes necessary to trigger a desktop notification", - &longValues["min_notif_changes"], + &longValues["min_notify_changes"], "monitor|m", "Keep monitoring for local and remote changes", &boolValues["monitor"], diff --git a/src/main.d b/src/main.d index 227f0735..3032dee1 100644 --- a/src/main.d +++ b/src/main.d @@ -169,7 +169,7 @@ int main(string[] args) writeln("Config option 'skip_dotfiles' = ", cfg.getValueBool("skip_dotfiles")); writeln("Config option 'skip_symlinks' = ", cfg.getValueBool("skip_symlinks")); writeln("Config option 'monitor_interval' = ", cfg.getValueLong("monitor_interval")); - writeln("Config option 'min_notif_changes' = ", cfg.getValueLong("min_notif_changes")); + writeln("Config option 'min_notify_changes' = ", cfg.getValueLong("min_notify_changes")); writeln("Config option 'log_dir' = ", cfg.getValueString("log_dir")); // Is config option drive_id configured? diff --git a/src/sync.d b/src/sync.d index c6eb250a..ccd7a2b8 100644 --- a/src/sync.d +++ b/src/sync.d @@ -627,7 +627,7 @@ final class SyncEngine if (("value" in changes) != null) { auto nrChanges = count(changes["value"].array); - if (nrChanges >= cfg.getValueLong("min_notif_changes")) { + if (nrChanges >= cfg.getValueLong("min_notify_changes")) { log.logAndNotify("Processing ", nrChanges, " changes"); } else { // There are valid changes