MatugenService => AppThemeService

This commit is contained in:
ItsLemmy
2025-10-06 14:51:43 -04:00
parent d7e8a8fe0b
commit 0ec4ba0c6e
5 changed files with 23 additions and 23 deletions
@@ -64,7 +64,7 @@ Singleton {
})
function init() {
Logger.log("Matugen", "Service started")
Logger.log("AppThemeService", "Service started")
}
Connections {
@@ -79,7 +79,7 @@ Singleton {
Connections {
target: Settings.data.colorSchemes
function onDarkModeChanged() {
Logger.log("Matugen", "Detected dark mode change")
Logger.log("AppThemeService", "Detected dark mode change")
if (Settings.data.colorSchemes.useWallpaperColors) {
generateFromWallpaper()
}
@@ -90,11 +90,11 @@ Singleton {
// Wallpaper Colors Generation
// --------------------------------------------------------------------------------
function generateFromWallpaper() {
Logger.log("Matugen", "Generating from wallpaper on screen:", Screen.name)
Logger.log("AppThemeService", "Generating from wallpaper on screen:", Screen.name)
const wp = WallpaperService.getWallpaper(Screen.name).replace(/'/g, "'\\''")
if (!wp) {
Logger.error("Matugen", "No wallpaper found")
Logger.error("AppThemeService", "No wallpaper found")
return
}
@@ -126,7 +126,7 @@ Singleton {
// Instead, we use 'sed' to apply a custom palette to the existing matugen templates.
// --------------------------------------------------------------------------------
function generateFromPredefinedScheme(schemeData) {
Logger.log("Matugen", "Generating templates from predefined color scheme")
Logger.log("AppThemeService", "Generating templates from predefined color scheme")
handleTerminalThemes()
@@ -333,7 +333,7 @@ Singleton {
stderr: StdioCollector {
onStreamFinished: {
if (this.text) {
Logger.warn("MatugenService", "GenerateProcess stderr:", this.text)
Logger.warn("AppThemeService", "GenerateProcess stderr:", this.text)
}
}
}
@@ -345,7 +345,7 @@ Singleton {
stderr: StdioCollector {
onStreamFinished: {
if (this.text) {
Logger.warn("MatugenService", "CopyProcess stderr:", this.text)
Logger.warn("AppThemeService", "CopyProcess stderr:", this.text)
}
}
}
+1 -1
View File
@@ -151,7 +151,7 @@ Singleton {
// Generate Matugen templates if any are enabled and setting allows it
if (Settings.data.colorSchemes.generateTemplatesForPredefined && hasEnabledMatugenTemplates()) {
MatugenService.generateFromPredefinedScheme(data)
AppThemeService.generateFromPredefinedScheme(data)
}
} catch (e) {
Logger.error("ColorScheme", "Failed to parse scheme JSON:", path, e)
+3 -3
View File
@@ -64,7 +64,7 @@ Singleton {
lines.push("\n[templates." + terminal.name + "]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/MatugenTemplates/' + terminal.path + '"')
lines.push('output_path = "' + terminal.output + '"')
lines.push('post_hook = "' + MatugenService.colorsApplyScript + " " + terminal.name + '"')
lines.push('post_hook = "' + AppThemeService.colorsApplyScript + " " + terminal.name + '"')
}
})
}
@@ -99,7 +99,7 @@ Singleton {
"output": "~/.config/fuzzel/themes/noctalia"
}],
"input": "fuzzel.conf",
"postHook": MatugenService.colorsApplyScript + " fuzzel"
"postHook": AppThemeService.colorsApplyScript + " fuzzel"
}, {
"name": "pywalfox",
"templates": [{
@@ -107,7 +107,7 @@ Singleton {
"output": "~/.cache/wal/colors.json"
}],
"input": "pywalfox.json",
"postHook": MatugenService.colorsApplyScript + " pywalfox"
"postHook": AppThemeService.colorsApplyScript + " pywalfox"
}, {
"name": "vesktop",
"templates": [{