Configurations on the plasma-panel-colorizer widget don't effect the current plasma-panel-colorizer version
The current version plasma-panel-colorizer significantly changed the structure it uses for its configuration. As a result the configuration set by plasma manager have no effect. The new version of plasma-panel-colorizer seems to store the configs in a config called globalSettings as json. I tried settings this directly to the value it was after manually changing some settings but still wasn't able to get anything working.
Attempt to set config manually
widgets = [
{
name = "luisbocanegra.panel.colorizer";
config = {
General = {
isEnabled = true;
hideWidget = false;
enableDebug = false;
globalSettings = builtins.toJSON {
panel = {
enabled = false;
blurBehind = false;
backgroundColor = {
enabled = true;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#013eff";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5CA"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
};
foregroundColor = {
enabled = false;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#fc0000";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5CA"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
padding = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
border = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5CA"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
borderSecondary = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5CA"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
shadow = {
background = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5CA"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
foreground = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
};
floatingDialogs = false;
};
widgets = {
enabled = true;
blurBehind = false;
backgroundColor = {
enabled = true;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#013efF";
list = [
"#a080fF"
"#a080fF"
"#a080fF"
"#181818"
"#181818"
"#181818"
"#181818"
"#ff596b"
"#99ff82"
"#181818"
"#a080fF"
"#a080fF"
"#a080ff"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 2;
};
foregroundColor = {
enabled = false;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#fc0000";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
};
radius = {
enabled = true;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
margin = {
enabled = true;
side = {
right = 0;
left = 0;
top = 2;
bottom = 2;
};
};
spacing = 4;
border = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
borderSecondary = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
shadow = {
background = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
foreground = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
};
};
trayWidgets = {
enabled = false;
blurBehind = false;
backgroundColor = {
enabled = false;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#013efF";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
};
foregroundColor = {
enabled = false;
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#fc0000";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
border = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
borderSecondary = {
enabled = false;
customSides = false;
custom = {
widths = {
left = 0;
bottom = 3;
right = 0;
top = 0;
};
margin = {
enabled = false;
side = {
right = 0;
left = 0;
top = 0;
bottom = 0;
};
};
radius = {
enabled = false;
corner = {
topLeft = 5;
topRight = 5;
bottomRight = 5;
bottomLeft = 5;
};
};
};
width = 0;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "highlightColor";
systemColorSet = "View";
custom = "#ff6c06";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
};
shadow = {
background = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
foreground = {
enabled = false;
color = {
lightnessValue = 0.5;
saturationValue = 0.5;
alpha = 1;
systemColor = "backgroundColor";
systemColorSet = "View";
custom = "#282828";
list = [
"#ED8796"
"#A6DA95"
"#EED49F"
"#8AADF4"
"#F5BDE6"
"#8BD5C4"
"#f5a97f"
];
followColor = 0;
saturationEnabled = false;
lightnessEnabled = false;
animation = {
enabled = false;
interval = 3000;
smoothing = 800;
};
sourceType = 1;
enabled = true;
};
size = 5;
xOffset = 0;
yOffset = 0;
};
};
};
nativePanelBackground = {
enabled = false;
opacity = 1;
};
stockPanelSettings = {
position = {
enabled = false;
value = "top";
};
alignment = {
enabled = false;
value = "center";
};
lengthMode = {
enabled = false;
value = "fill";
};
visibility = {
enabled = false;
value = "none";
};
opacity = {
enabled = false;
value = "adaptive";
};
floating = {
enabled = false;
value = false;
};
thickness = {
enabled = false;
value = 48;
};
visible = {
enabled = false;
value = true;
};
};
configurationOverrides = {
overrides = {};
associations = [];
};
unifiedBackground = [];
};
};
};
}
];
I will update it soon, I haven't updated it on a while. For now, you should be able to set it using the settings option, or manually as it looks like you are currently doing
@Ori-Riaru Hi, I was just wondering if you found a workaround for using plasma-panel-colorizer, I cant seem to get it to apply the config, even when I use your exact config shown above
@Ori-Riaru @notjiatan Hey, the problem with the example given is that the JSON needs to be escaped because it ends up being put inside a javascript string.
Try something like this:
config.General.globalSettings = lib.escape ["\"" "\\"] (builtins.toJSON {
nativePanelBackground.enabled = false;
});
The reason this fails without it is that builtins.toJSON generates something like {"nativePanelBackground":{"enabled":false}}, which gets put inside a javascript string like so:
w.writeConfig("globalSettings", "{"nativePanelBackground":{"enabled":false}}");
That absolutely breaks Javascript parsing. You can see this code snippet's syntax highlighting is all over the place. " is used to signify the start and end of the string, but there's some inside the string here.
You can't have that; You must escape any " characters inside the string like so:
w.writeConfig("globalSettings", "{\"nativePanelBackground\":{\"enabled\":false}}");
As you can see, the syntax highlighting now works; The code is parsed correctly.
This can be achieved with lib.escape ["\""] (builtins.toJSON {...}).
I escaped \ as well, as that's another character you'd need to escape should you want to use it within a string.
Thank you! This works with your change.