My plasma style is set to follow the color scheme, but about half the time, KDE partially fails and only the ‘Settings’ windows change color scheme as expected.
System Window: Successfully in dark mode Task bar: Still in light mode Application Launcher: Still in light mode Chromium Extension that triggers via system dark mode: Still in light mode
Curious if anyone has an advice? AFAIK, the following variables aren’t the issue, but worth mentioning just in case:
I’m using a Nvidia driver on X11
I run a script that uses plasma-apply-colorscheme to change the color scheme instead of the GUI. (If/when the switch doesn’t occur via the script, manually editing the color scheme fails as well)
The dark themes I’m using are Dracula/DraculaPurple
Question, how often do you change your color scheme? You make it sound like you need to do this several times a day.
I haven’t changed my color scheme in years, and even if I changed it seasonally and needed to log out and back in again, I hardly consider that interrupting my workflow.
I use a light mode during the day, and then at night, I want to be able to use my computer w/o being blinded (ie no white backgrounds) .
Plasma Style can be tied to the color scheme, so changing the color scheme automatically changes the Plasma Style (ie: Breeze Light → Breeze Dark). As a result, I change the color scheme ~2x a day.
Curious if you have an alternative solution that you’re using, or if you are going to lecture me about how using a white background at night builds character…
Sorry if I was a little snippy. I think your use case re: color scheme is vastly different from those who care about using dark mode at night, and so your comment was well-intended but potentially not as relevant as it could’ve been.
I created a script to change the color. The short version of it is that it uses the plasma-apply-colorscheme command to switch colors. Here is the long version
I believe the script is operating as expected because the ‘Settings’ windows always successful transition as expected (and I believe Dolphin too), but the rest of the apps (Kate, Chromium, etc) only auto-inherit the color scheme ~40% of the time.
When the rest of the apps don’t trigger, I go to Settings and manually select another dark color scheme, and everything inherits the color scheme as expected.
My uneducated guess is that system plasma apps successfully trigger, but ‘follow system theme’ apps have additional layers/logic that might occasionally be overlooked when using plasma-apply-colorscheme.
About 70% sure I’ve found the resolution, just fine-tuning it for minimal friction.
What has allowed execution as expected is when I used an old trick I learned through VBA w/ my last job where I insert a sleep break to ensure that the system has a chance to fully load the variables.
I had spun off the original script to also run via autostart and made a small adjustment re: a 20 second sleep break, w/ the assumption that the system might need more time during startup. My script’s success rate has transitioned from ~25% to (what feels like) basically every time, but, due to the prior ‘aha’ moments that failed, I will wait before committing to that lol.
Once I noticed the success rate was better than when I manually triggered the script, I started delving deeper. I’m not sure what the ideal sleep is, but I’m currently halving the # after an arbitrary number of consistent executions.
EDIT: The script successfully running started happening before I switched, but it is worth noting I also jumped ship from X11 to Wayland recently too.
in plasma5, there is a setting in Display Monitor > Night Color
it ‘darkens’ your colors/theme depending ‘time of day’ you can set it to a custom time schedule, always and never.
The last piece of advice I’d give to anyone experiencing the same issue is to move away from cron and use systemd instead. I have a strong suspicion that environment variables had something to do w/ my issues as well.
Making the switch, it now works 100% of the time on my laptop, and just working out some kinks on my desktop to get it firing on all cylinders there. But yeah, closing this as resolved.