Custom KDE Global Theme, how to apply "Use desktop layout from theme" from BASH or ECMAScript?

Kyle K kylek389 at gmail.com
Wed Mar 18 21:16:01 GMT 2020


Hi guys, I'm in process of creating a customized KDE Global theme called
GentooX for my Gentoo distribution that I'm in process of creating. I have
used the *Plasma Look And Feel Explorer* from *plasma-sdk* to create my
theme, and my distro's postinstall script uses something like this to apply
the theme:

kpackagetool5 -i "/usr/src/theme/GentooX Breeze Dark Transparent.tar.gz"

lookandfeeltool --apply GentooX`

However after issuing the above 2 commands the "Use desktop layout from
theme" is not activated in System Settings resulting in panels not being
arranged properly etc. How can I apply "Use desktop layout from theme" from
a bash script of KDE's ECMAScript?  https://i.redd.it/phpenx8jdwm41.jpg

I think the org.kde.plasma.desktop-layout.js file gets executed when "Use
desktop layout from theme" is checked. I have tried something like this but
it didn't apply that checkbox:

script="/home/gentoox/.local/share/plasma/look-and-feel/GentooX/contents/layouts/org.kde.plasma.desktop-layout.js"

num=$(dbus-send --print-reply --dest=org.kde.KWin \

/Scripting org.kde.kwin.Scripting.loadScript \

string:"$script" | awk 'END {print $2}' )

dbus-send --print-reply --dest=org.kde.KWin /$num \

org.kde.kwin.Scripting.run


I also tried placing org.kde.plasma.desktop-layout.js from my GentooX theme
in `kf5-config --path data`/plasma/shells/org.kde.plasma.desktop/updates/`
hoping it would auto-apply on first logon but it too didn't work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20200318/e98b0989/attachment.htm>


More information about the kde mailing list