Add support for user based templates (~/.config/matugen/config.toml) as

requested in #185
MatugenService: add logic to scan for the matugen config.toml
ColorSchemeTab: add NCheckbox to toggle user based templates
This commit is contained in:
Ly-sec 2025-09-01 14:54:01 +02:00
parent 4193d3c87c
commit 4a4bec5aec
4 changed files with 37 additions and 5 deletions

View file

@ -465,5 +465,22 @@ ColumnLayout {
MatugenService.generateFromWallpaper()
}
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginM * scaling
Layout.bottomMargin: Style.marginM * scaling
}
NCheckbox {
label: "User Templates"
description: "Enable user-defined Matugen config from ~/.config/matugen/config.toml"
checked: Settings.data.matugen.enableUserTemplates
onToggled: checked => {
Settings.data.matugen.enableUserTemplates = checked
if (Settings.data.colorSchemes.useWallpaperColors)
MatugenService.generateFromWallpaper()
}
}
}
}