Merge branch 'main' of github.com:noctalia-dev/noctalia-shell

This commit is contained in:
LemmyCook 2025-09-01 09:07:25 -04:00
commit e3d62388f7
4 changed files with 37 additions and 5 deletions

View file

@ -41,10 +41,22 @@ Singleton {
var pathEsc = dynamicConfigPath.replace(/'/g, "'\\''")
var extraRepo = (Quickshell.shellDir + "/Assets/Matugen/extra").replace(/'/g, "'\\''")
var extraUser = (Settings.configDir + "matugen.d").replace(/'/g, "'\\''")
// Build the main script
var script = "cat > '" + pathEsc + "' << 'EOF'\n" + content + "EOF\n" + "for d in '" + extraRepo + "' '" + extraUser
+ "'; do\n" + " if [ -d \"$d\" ]; then\n"
+ " for f in \"$d\"/*.toml; do\n" + " [ -f \"$f\" ] && { echo; echo \"# extra: $f\"; cat \"$f\"; } >> '"
+ pathEsc + "'\n" + " done\n" + " fi\n" + "done\n" + "matugen image '" + wp + "' --config '" + pathEsc + "' --mode " + mode
// Add user config execution if enabled
if (Settings.data.matugen.enableUserTemplates) {
var userConfigDir = (Quickshell.env("HOME") + "/.config/matugen/").replace(/'/g, "'\\''")
script += "\n# Execute user config if it exists\nif [ -f '" + userConfigDir + "config.toml' ]; then\n"
script += " matugen image '" + wp + "' --config '" + userConfigDir + "config.toml' --mode " + mode + "\n"
script += "fi"
}
script += "\n"
generateProcess.command = ["bash", "-lc", script]
generateProcess.running = true
}
@ -53,12 +65,13 @@ Singleton {
id: generateProcess
workingDirectory: Quickshell.shellDir
running: false
stdout: StdioCollector {
onStreamFinished: Logger.log("Matugen", "Completed colors generation")
}
stderr: StdioCollector {
onStreamFinished: if (this.text !== "")
Logger.error(this.text)
onStreamFinished: {
if (this.text !== "") {
Logger.warn("MatugenService", "Matugen stderr:", this.text)
}
}
}
}