mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Matugen: add vencord support
ColorSchemeTab: add proper line break for discord templates
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user