diff --git a/Assets/Translations/de.json b/Assets/Translations/de.json index 2be6197b..aed4c10c 100644 --- a/Assets/Translations/de.json +++ b/Assets/Translations/de.json @@ -537,7 +537,7 @@ }, "discord": { "description": "Schreibt {filepath} für {client}", - "description-missing": "Kein Discord-Client erkannt. Installieren Sie vesktop, webcord, armcord, equibop, lightcord oder dorion." + "description-missing": "Kein Discord-Client erkannt. Installieren Sie vencord, vesktop, webcord, armcord, equibop, lightcord oder dorion." }, "pywalfox": { "description": "Schreibt {filepath} und führt pywalfox update aus", diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 915b75d1..f18e6ac9 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -541,7 +541,7 @@ }, "discord": { "description": "Write {filepath} for {client}", - "description-missing": "No Discord client detected. Install vesktop, webcord, armcord, equibop, lightcord, or dorion." + "description-missing": "No Discord client detected. Install vencord, vesktop, webcord, armcord, equibop, lightcord, or dorion." }, "pywalfox": { "description": "Write {filepath} and run pywalfox update", diff --git a/Assets/Translations/es.json b/Assets/Translations/es.json index 72251b3f..a00881fe 100644 --- a/Assets/Translations/es.json +++ b/Assets/Translations/es.json @@ -537,7 +537,7 @@ }, "discord": { "description": "Escribir {filepath} para {client}", - "description-missing": "No se detectó cliente de Discord. Instala vesktop, webcord, armcord, equibop, lightcord o dorion." + "description-missing": "No se detectó cliente de Discord. Instala vencord, vesktop, webcord, armcord, equibop, lightcord o dorion." }, "pywalfox": { "description": "Escribir {filepath} y ejecutar pywalfox update", diff --git a/Assets/Translations/fr.json b/Assets/Translations/fr.json index 8399a63a..ec9af8ac 100644 --- a/Assets/Translations/fr.json +++ b/Assets/Translations/fr.json @@ -537,7 +537,7 @@ }, "discord": { "description": "Écrire {filepath} pour {client}", - "description-missing": "Aucun client Discord détecté. Installez vesktop, webcord, armcord, equibop, lightcord ou dorion." + "description-missing": "Aucun client Discord détecté. Installez vencord, vesktop, webcord, armcord, equibop, lightcord ou dorion." }, "pywalfox": { "description": "Écrire ~/.cache/wal/colors.json et exécuter pywalfox update", diff --git a/Assets/Translations/pt.json b/Assets/Translations/pt.json index c4c3ea52..02979bf1 100644 --- a/Assets/Translations/pt.json +++ b/Assets/Translations/pt.json @@ -499,7 +499,7 @@ }, "discord": { "description": "Escrever {filepath} para {client}", - "description-missing": "Nenhum cliente Discord detectado. Instale vesktop, webcord, armcord, equibop, lightcord ou dorion." + "description-missing": "Nenhum cliente Discord detectado. Instale vencord, vesktop, webcord, armcord, equibop, lightcord ou dorion." }, "pywalfox": { "description": "Escrever {filepath} e executar pywalfox update", diff --git a/Assets/Translations/zh-CN.json b/Assets/Translations/zh-CN.json index 0116a5da..a251a5d4 100644 --- a/Assets/Translations/zh-CN.json +++ b/Assets/Translations/zh-CN.json @@ -537,7 +537,7 @@ }, "discord": { "description": "为 {client} 写入 {filepath}", - "description-missing": "未检测到 Discord 客户端。请安装 vesktop、webcord、armcord、equibop、lightcord 或 dorion。" + "description-missing": "未检测到 Discord 客户端。请安装 vencord、vesktop、webcord、armcord、equibop、lightcord 或 dorion。" }, "pywalfox": { "description": "写入 {filepath} 并运行 pywalfox update", diff --git a/Modules/Settings/Tabs/ColorSchemeTab.qml b/Modules/Settings/Tabs/ColorSchemeTab.qml index 7dc9db1e..ddf48db1 100644 --- a/Modules/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Settings/Tabs/ColorSchemeTab.qml @@ -530,6 +530,8 @@ ColumnLayout { return "Detected: " + clientInfo.join(", ") } } + Layout.fillWidth: true + Layout.preferredWidth: -1 checked: { // Check if any Discord client template is enabled var anyEnabled = false diff --git a/Services/MatugenTemplates.qml b/Services/MatugenTemplates.qml index c7da9c3c..75c83db4 100644 --- a/Services/MatugenTemplates.qml +++ b/Services/MatugenTemplates.qml @@ -115,9 +115,9 @@ Singleton { "input": "pywalfox.json", "postHook": AppThemeService.colorsApplyScript + " pywalfox" }, { - "name": "discord_vesktop", + "name": "discord_vesktops", "templates": [{ - "version": "discord_vesktop", + "version": "discord_vesktops", "output": "~/.config/vesktop/themes/noctalia.theme.css" }], "input": "vesktop.css" @@ -156,6 +156,14 @@ Singleton { "output": "~/.config/dorion/themes/noctalia.theme.css" }], "input": "vesktop.css" + }, { + "name": "discord_vencord", + "templates": [{ + "version": "discord_vencord", + "output": "~/.config/discord/themes/noctalia.theme.css" + }], + "input": "vesktop.css", + "requiresThemesFolder": true }] // -------------------------------- @@ -193,7 +201,8 @@ Singleton { clients.push({ "name": clientName, "configPath": configPath, - "themePath": themePath + "themePath": themePath, + "requiresThemesFolder": app.requiresThemesFolder || false }) } } diff --git a/Services/ProgramCheckerService.qml b/Services/ProgramCheckerService.qml index 5335ed52..790fa71a 100644 --- a/Services/ProgramCheckerService.qml +++ b/Services/ProgramCheckerService.qml @@ -28,14 +28,25 @@ Singleton { // Function to detect Discord client by checking config directories function detectDiscordClient() { - // Build list of client names from MatugenTemplates - var clientNames = [] + // Build shell script to check each client + var scriptParts = ["available_clients=\"\";"] + for (var i = 0; i < MatugenTemplates.discordClients.length; i++) { - clientNames.push(MatugenTemplates.discordClients[i].name) + var client = MatugenTemplates.discordClients[i] + var clientName = client.name + + // Check if this client requires themes folder to exist + if (client.requiresThemesFolder) { + scriptParts.push("if [ -d \"$HOME/.config/" + clientName + "/themes\" ]; then available_clients=\"$available_clients " + clientName + "\"; fi;") + } else { + scriptParts.push("if [ -d \"$HOME/.config/" + clientName + "\" ]; then available_clients=\"$available_clients " + clientName + "\"; fi;") + } } + scriptParts.push("echo \"$available_clients\"") + // Use a Process to check directory existence for all clients - discordDetector.command = ["sh", "-c", "available_clients=\"\"; " + "for client in " + clientNames.join(" ") + "; do " + " if [ -d \"$HOME/.config/$client\" ]; then " + " available_clients=\"$available_clients $client\"; " + " fi; " + "done; " + "echo \"$available_clients\""] + discordDetector.command = ["sh", "-c", scriptParts.join(" ")] discordDetector.running = true }