Merge pull request #1351 from wojciechsulocki-gif/feat/kde-colorscheme-auto-apply

feat: Auto-apply KDE color schemes with plasma-apply-colorscheme
This commit is contained in:
Lysec
2026-01-12 09:36:03 +01:00
committed by GitHub
2 changed files with 21 additions and 2 deletions
+2 -1
View File
@@ -216,7 +216,8 @@ Singleton {
lines.push(`input_path = "${Quickshell.shellDir}/Assets/MatugenTemplates/${inputFile}"`);
const outputPath = output.path.replace("~", homeDir);
lines.push(`output_path = "${outputPath}"`);
if (app.postProcess) {
// Add postProcess only on last output
if (app.postProcess && idx === app.outputs.length - 1) {
const postHook = escapeTomlString(app.postProcess(mode));
lines.push(`post_hook = "${postHook}"`);
}
+19 -1
View File
@@ -85,8 +85,26 @@ Singleton {
"outputs": [
{
"path": "~/.local/share/color-schemes/noctalia.colors"
},
{
"path": "~/.local/share/color-schemes/noctalia-alt.colors"
}
]
],
"postProcess": function(mode) {
// Apply KDE color scheme with workaround for plasma-apply-colorscheme bug
// KDE requires different name to trigger refresh, so we alternate between two files
const stateFile = "~/.cache/noctalia/kde-colorscheme-state";
return `if command -v plasma-apply-colorscheme >/dev/null 2>&1; then
mkdir -p ~/.cache/noctalia
if [ -f "${stateFile}" ] && [ "$(cat ${stateFile})" = "alt" ]; then
plasma-apply-colorscheme noctalia >/dev/null 2>&1
echo "main" > ${stateFile}
else
plasma-apply-colorscheme noctalia-alt >/dev/null 2>&1
echo "alt" > ${stateFile}
fi
fi`;
}
},
{
"id": "fuzzel",