Difference between revisions of "Plasma/Create a Global Theme Package"

(Redirect to page with correct name)
Tag: New redirect
Line 1: Line 1:
<languages />
#REDIRECT [[Plasma/Create a Global Theme Package]]
== How to create your own Look and Feel package == <!--T:1-->
First of all we need to install '''Plasma Look And Feel Explorer''', which is a part of the '''plasma-sdk''' package.
Plasma Look and Feel Explorer is a rather simple app.
On the right panel/side you have three options:
* '''A list of installed look and feel themes''' in your system, so you can pick one and edit it directly.</translate>
*'''Open Theme folder''' - It opens a directory where look and feel themes are saved.<br /><tt>/home/yourusername/.local/share/plasma/look-and-feel/</tt></translate>
*'''New Theme''', where you can fill in all details of your theme, like name, author etc. You need to fill in all the fields, otherwise  the ''OK'' button will stay grayed out. If you click ''OK'' you will get a notification saying ''Plasma Layout successfully duplicated''.
You can now choose your freshly created look and feel theme from the list of available themes and edit it in the main window.
*'''Main window'''<br />It is rather self-explanatory. You can edit details of your look and feel package (name, author, etc). These details are saved into metadata.desktop in your look and feel directory. You also have two buttons there:
*'''Layout from current Plasma setup'''<br />It saves your current desktop layout like placement of panels, plasma applets, wallpaper etc. All these settings are saved into:</translate><br /><br /><translate>
<tt>.local/share/plasma/look-and-feel/nameofyourtheme/contents/layouts/org.kde.plasma.desktop-layout.js</tt></translate><br /><br /><translate>
This is a javascript file executed when you check "Use desktop layout from theme" in the Look And Feel module of System Settings.  If your look and feel theme does not change desktop layout, you can safely remove that file.</translate><br /><br /><translate>
The content of the Javascript file will recreate a plasma configuration mirroring the contents of your current main plasma configuration file: <tt>~/.config/plasma-org.kde.plasma.desktop-appletsrc</tt>
If you want to have more granular control over what exactly happens with your theme, especially with the layout you can use [[Special:myLanguage/KDE_System_Administration/PlasmaDesktopScripting|Plasma desktop scripting]]. Check out this [[Special:myLanguage/Plasma/How_to_create_a_Unity-like_look_and_feel_theme_using_Plasma%E2%80%99s_Desktop_Scripting_API|tutorial]] for more info.
*'''Defaults from current setup'''<br />It creates a file:</translate><br /><translate>
<tt>.local/share/plasma/look-and-feel/nameofyourtheme/contents/"default"</tt></translate><br /><translate>
The following settings are saved:</translate>
**widget style</translate>
**color scheme</translate>
**plasma theme</translate>
**cursor theme</translate>
**window switcher</translate>
**desktop switcher</translate>
**window decoration.
You can also add an image which will be used as a preview, stored in
== How to add dependencies from KDE Store. == <!--T:25-->
First of all you need to add
to your metadata.desktop. Lets take a look at this example
[https://store.kde.org/p/1001720 Elementary Luna Plasma Color Schemes]
'''kns://''' - the name of the protocol
'''colorschemes.knsrc''' - type of the resource we want to download (color scheme in that case)
Here is a list of available resources on my system (/etc/xdg)
'''api.kde-look.org/1001720''' - the url to the content stored on the server, from my experience ''api.kde-look.org/'' is always the same, only id changes. You can get the id from the kde store url ''https://store.kde.org/p/1001720'' '''1001720'''.
You can specify more than one dependency. Here is an example from [https://store.kde.org/p/1167950/ United] metadata.desktop
{{Input|1=<nowiki>X-KPackage-Dependencies: { "kns://colorschemes.knsrc/api.kde-look.org/1001495", "kns://plasma-themes.knsrc/api.kde-look.org/998797", "kns://aurorae.knsrc/api.kde-look.org/1136954" }</nowiki>}}
* [https://store.kde.org/p/1001495 Color Scheme (Ambiance)]
* [https://store.kde.org/p/998797 Plasma theme (Unity Ambiance)]
* [https://store.kde.org/p/1136954 Aurorae (Blender Ambiance)]
You can install your look and feel package from terminal using
{{Input|1=kpackagetool5 -i "name of your theme"}}
It will be installed to <tt>.local/share/plasma/look-and-feel/</tt>
This will also install dependencies specified in <tt>metadata.desktop</tt>, so you can test it locally on your system.
Type <code>kpackagetool5 -h</code> to see more options.
== System dependencies  (experimental)== <!--T:61-->
You can specify system dependencies using their AppStream URI scheme. More information about it can be found [https://www.freedesktop.org/software/appstream/docs/sect-AppStream-Services-UrlHandler.html here].
To look up what's the resource you are looking for, you can check on your system by calling <code>appstreamcli search <something></code>
When the Look and Feel package is installed, if a system dependency is specified, it will be the system deciding how to install it, most likely using PackageKit.

Revision as of 16:36, 23 October 2019

This page was last edited on 23 October 2019, at 16:36. Content is available under Creative Commons License SA 4.0 unless otherwise noted.