feat: add stop command to terminate the clipboard watcher daemon

This commit is contained in:
2025-05-21 00:07:48 +02:00
parent 2e77ee2333
commit 72705afc16
5 changed files with 102 additions and 13 deletions

View File

@ -37,11 +37,15 @@ func LoadConfig() (Config, string) {
if err != nil {
continue
}
defer file.Close()
d := yaml.NewDecoder(file)
if err := d.Decode(&cfg); err == nil {
file.Close()
if cfg.Logging.Path == "" {
cfg.Logging.Path = logFilePath()
}
return cfg, path
}
file.Close()
}
cfg.Logging.Format = "console"