[kde] [Bug 506804] New: Custom configuration for Applets (XDG configs and rc files)
Sergey Katunin
bugzilla_noreply at kde.org
Wed Jul 9 15:27:07 BST 2025
https://bugs.kde.org/show_bug.cgi?id=506804
Bug ID: 506804
Summary: Custom configuration for Applets (XDG configs and rc
files)
Classification: I don't know
Product: kde
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: general
Assignee: unassigned-bugs at kde.org
Reporter: sulmpx60 at yandex.ru
Target Milestone: ---
SUMMARY
Many KDE components and applications that use KConfig and KConfigXT allow you
to override default settings via XDG configs (ini files ending in rc).
For example, this way a system administrator can change the default settings by
`/etc/xdg`, or `.config/`.
But it seems that plasmoid applets do not support XDG configs (like
`kickoffrc`). The default values are written in the file along with the package
in the file main.xml.
So, if you need to customize the default settings of applet configuration, you
need to edit this main.xml manually.
But if you edit the configuration template (xml) files directly, then usually
such changes are not saved, as they are replaced when updating the package in
the distribution.
Accordingly, to change the configuration, you will either have to fork the
applet with the changed configuration, or make some complex mechanisms with
triggers that will change these files after updating the applet in the
distribution, which is undesirable.
POSSIBLE SOLUTIONS
I tried to get around this without major modifications.
1) The first idea was to somehow change the default values for the elements
of the loaded configuration. But unfortunately, KConfigLoader does not allow
this behavior to be changed, it parses the xml file manually and immediately
saves it in KConfigSkeleton, which in turn also does not have methods for
changing the default values for its elements.
More precisely, there is a swapDefault() method of skeleton item, but calling
such methods will lead to changes in the user
`plasma-org.kde.plasma.desktop-appletsrc`.
2) Another option is to somehow change the XML file right before loading it
into KConfigLoader. In general, this is possible, but for this I need to make
some kind of custom parser that will do this.
It would be nice, if there were a method in KConfigLoader or KConfigSkeleton
that would allow specifying a KConfig (which would be read from XDG
directories) that would contain overridden values, and these values would
merge and replace the default overridden ones in this KConfigSkeleton.
So far, the only thing I could do without major changes was to add the ability
to read custom xml files in XDG_DATA_DIRS (/usr/share, /usr/local/share,
~/.local/share/) directories, like
`/usr/share/applets.kcfg/org.kde.plasma.kickoff.kcfg`.
Accordingly, allowing system admins and users to customize the standard applet
settings by this.
It looks like customization of elements in the control panel in Dolphin (where
they are set by kxmlgui5), but all this is of course just a temporary
workaround.
Accordingly, I decided to write about this to raise this issue. Perhaps this
issue has already been raised somewhere, I apologize in advance if this is a
duplicate.
OBSERVED RESULT
Plasmoid applets do not support configuration customization via XDG configs
(/etc/xdg and rc files).
EXPECTED RESULT
Plasmoid applets do support configuration customization via XDG configs
(/etc/xdg and rc files), like other KDE system components and applications.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list