feat: add advanced update management features

This commit is contained in:
2026-05-03 22:55:51 +02:00
parent a22d2e16ea
commit 137290e3d7
7 changed files with 644 additions and 150 deletions

View File

@@ -8,9 +8,12 @@ import (
)
type Config struct {
CheckAUR bool `json:"check_aur"`
ReminderIntervalHours int `json:"reminder_interval_hours"`
Terminal string `json:"terminal"`
CheckAUR bool `json:"check_aur"`
ReminderIntervalHours int `json:"reminder_interval_hours"`
Terminal string `json:"terminal"`
AutoRefreshMinutes int `json:"auto_refresh_minutes"`
ShowIgnored bool `json:"show_ignored"`
IgnoredPackages []string `json:"ignored_packages"`
}
func Default() Config {
@@ -18,6 +21,9 @@ func Default() Config {
CheckAUR: true,
ReminderIntervalHours: 168,
Terminal: "auto",
AutoRefreshMinutes: 30,
ShowIgnored: false,
IgnoredPackages: []string{},
}
}
@@ -61,5 +67,11 @@ func normalize(cfg Config) Config {
if cfg.Terminal == "" {
cfg.Terminal = Default().Terminal
}
if cfg.AutoRefreshMinutes < 0 {
cfg.AutoRefreshMinutes = Default().AutoRefreshMinutes
}
if cfg.IgnoredPackages == nil {
cfg.IgnoredPackages = []string{}
}
return cfg
}