Bug 507681

Summary: The plasma-apply-desktoptheme cli tool does not work anymore.
Product: [Plasma] plasmashell Reporter: Revincx <revincx233>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate, revincx233
Priority: NOR Keywords: regression
Version First Reported In: 6.4.3   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.5
Sentry Crash Report:

Description Revincx 2025-07-31 03:10:03 UTC
SUMMARY

Plasmashell provides a series of cli tools to change plasma themes such as plasma-apply-colorscheme and plasma-apply-desktoptheme. But the tool plasma-apply-desktoptheme doesn't take effect anymore. Although the desktop theme setings changed after using the tool, the theme and style of plasma panels doesn't change immediately.

STEPS TO REPRODUCE
1. Exec `plasma-apply-desktoptheme [desktop theme]` in terminal.
2. Notice the changes of plasma panels.

OBSERVED RESULT

The theme of plasma panels doesn't change.

EXPECTED RESULT

The theme  of plasma panels changes immediately.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Comment 1 Bug Janitor Service 2025-08-03 17:54:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5732
Comment 2 Nicolas Fella 2025-08-10 12:48:51 UTC
Git commit 2a709066fc725d774a55ca0ac221cefa65eda0d2 by Nicolas Fella.
Committed on 10/08/2025 at 12:48.
Pushed by nicolasfella into branch 'master'.

[plasma-apply-desktoptheme] Notify config change

https://invent.kde.org/plasma/libplasma/-/commit/af85630935c050ca2600b2c5eae7d55a23b2848e
changed Plasma::Theme to use KConfigWatcher to react to config changes instead of
file-monitoring plasmarc.

That means we need to pass the notify flag when writing the config change.

To be able to do that manipulate the config directly instead of through the
Theme API

M  +14   -5    kcms/desktoptheme/plasma-apply-desktoptheme.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/2a709066fc725d774a55ca0ac221cefa65eda0d2
Comment 3 Nicolas Fella 2025-08-10 12:49:24 UTC
Git commit dfd6d253467deb5df1c2e61771978394ecd52449 by Nicolas Fella.
Committed on 10/08/2025 at 12:49.
Pushed by nicolasfella into branch 'Plasma/6.4'.

[plasma-apply-desktoptheme] Notify config change

https://invent.kde.org/plasma/libplasma/-/commit/af85630935c050ca2600b2c5eae7d55a23b2848e
changed Plasma::Theme to use KConfigWatcher to react to config changes instead of
file-monitoring plasmarc.

That means we need to pass the notify flag when writing the config change.

To be able to do that manipulate the config directly instead of through the
Theme API
(cherry picked from commit 2a709066fc725d774a55ca0ac221cefa65eda0d2)

M  +14   -5    kcms/desktoptheme/plasma-apply-desktoptheme.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/dfd6d253467deb5df1c2e61771978394ecd52449