Please test improved Plasma Theme switching for Plasma 5.16

Help testing the Plasma Theme switching now

You like Plasma Themes? You design Plasma Themes even yourself? You want to see switching Plasma Themes working correctly, especially for Plasma panels?

Please get one of the Live images with latest code from the Plasma developers hands (or if you build manually yourself from master branches, last night’s code should be fine) and give the switching of Plasma Themes a good test, so we can be sure things will work as expected on arrival of Plasma 5.16:

If you find glitches, please report them here in the comments, or better on the #plasma IRC channel.

Plasma Themes, to make it more your Plasma

One of the things which makes Plasma so attractive is the officially supported option to customize also the style, and that beyond colors and wallpaper, to allow users to personalize the look to their likes. And designers have picked up on that and did a good set of custom designs (store.kde.org lists at the time of writing 470 themes).

And while in the last Plasma versions some regressions in the Theme support had sneaked in, because most people & developers are happily using the default Breeze theme, with Plasma 5.16 some theming fixes are to arrive.

Plasma Theme looking good on first contact with Plasma 5.16

The most annoying pain point has been that on selecting and applying a new Plasma Theme, the theme data was not correctly picked up especially by Plasma panels. Only after a restart of Plasma could the theme be fully experienced. Which made quick testing of themes e.g. from store.kde.org a sad story, given most themes looked a bit broken. And without knowing more one would think it is the theme’s fault.

But some evenings & nights have been spent to hunt down the reasons, and it seems they all have been found and corrected. So when one clicks the “Apply” button, the Plasma Theme instantly styles your Plasma desktop as it should, especially the panels.

And dressing up your desktop to match your day or week or mood or your shirt with one of those partially excellent themes is only a matter of some mouse clicks. No more restart needed 🙂

Coming to your system with Plasma 5.16 and KDE Frameworks 5.59 (both to be released in June).

Make your Plasma Theme take advantage of Plasma 5.16

Theme designers, please study the recently added page on techbase.kde.org about Porting Themes to latest Plasma 5. It lists the changes known so far and what to do for them. Please extend the list if something is yet missing.
And tell your theme designer friends about this page, so they can improve their themes as well.

Advertisements

Some theming fixes to arrive with Plasma 5.16

One of the things which makes Plasma so attractive is the officially supported option to customize also the style, and that beyond colors and wallpaper, to allow users to personalize the look to their likes. And designers have picked up on that and did a good set of custom designs (store.kde.org lists at the time of writing 454 themes).

Intended changes and unintended changes

In the 11 years since Plasma was released first (January 11, 2008) there has been some evolution of the theming options. Sadly also sometimes regressions in the support of older options were introduced, mainly in the early phase of Plasma 5 when code was ported to QtQuick 2 and the new default theme Breeze did not expose the regression or even triggered some changes for its special needs or for simplifications it allowed.

Given Breeze as default was pleasing to most, and possibly some alternative theme designers were lost during the longer phase from a pleasing KDE4 to an again pleasing Plasma 5, and new theme designers made their themes directly matching latest Plasma 5 Theme support, the piled-up regressions were not a real issue for those contributing.

Well, not a real issue unless on started to restore an old theme like “Fluffy Bunny”. And was wondering why it looks broken. And then wondering the same while playing with all the other old themes still available on store.kde.org.

So much partially good artwork being broken made my heart bleed, and in the absence of own designer abilities it was time to document the regressions as well as fix some code where possible to restore previous variability.

Teaching Porting to Plasma 5

So, theme designers, please find a new page on techbase.kde.org about Porting Themes to latest Plasma 5. It lists the changes known so far and what to do for them. Please extend the list if something is yet missing. One might test the fixes in the code against one’s themes with latest development versions of Plasma using Live images.

Fresh old Air & Oxygen

And even the Oxygen & Air themes, the default Plasma themes during KDE4 times, while being maintained as official themes part of current Plasma releases, had suffered some small regressions (e.g. analog clocks hands rotation point or progressbar height). No more, with Plasma 5.16 the visual experience of Oxygen & Air should be closer to the original.

Luxury on the borders results in bad looks

Sadly there is one thing which is not so easy to fix: Plasma code now assumes for any frames (like with borders of panels & pop-up dialogs) that the actual border visuals are negligible and the margin from the outside to the content is the same, with border on the side enabled or not. With luxurious decorated borders (like Fluffy Bunny or Spoons Original) this sadly results in bad looking bigger margins on sides where the border is disabled (see details). Which is sad especially given that High DPI display actually would allow more fanciness, even more when in the future Flat design gets replaced by whatever new trend. My passive dreams & hopes are on for Plasma 6 😉

Separating Plasma 5 compatible themes on store.kde.org

And while there now is a list of things to do to make old themes work again, many themes on store.kde.org no longer are maintained. There is talk about separating those, e.g. at time of Plasma 5.16 release, so there would be a clean list of working and maintained themes for latest Plasma 5.

The Second Return of the Fluffy Bunny

The old among us might remember KDE4 and something one could call the “Pink Phase”, when people explored how “interesting” they could make their digital workplace by applying certain colors and themes… don’t most of us sometimes need a fluffy and color-intensive world to escape to… if only to learn to value reality again, when things get too fluffy 🙂

The most outstanding work useful for that had been done once by Florian Schepper who created the Plasma theme “Fluffy Bunny”, which won hearts over on first sight. Sadly though the theme bundle got lost, was recovered, only to then by the times getting lost again from the stores. Time to repeat that, at least the recovering 🙂

And so last week the internet and local backups had been scanned to restore the theme again, to quick first success:

Well, besides the regression Plasma5 has over the old Plasma 😉 With only thin & non-tiled border themes trendy and used the last years, sadly current Plasma has some issues, also does it assume that borders of panels are rectangular when creating the default BlurBehind mask. Some first patches (1, 2, 3) are already under review.

Get the initial restored version from your Plasma desktop via System settings/Workspace Theme/Plasma Theme/Get new Plasma Themes…/Search “Fluffy Bunny” or via the Web interface from store.kde.org and enjoy a bit of fluffy Plasma 😉

Next up: restoring the “Plasma Bunny” theme from the once drafted “Fluffy” linux distribution… less flurry, but more pink!
Update: First version of new named “Unicorn” is now up in the store for your entertainment.

Templates to create your own Plasma Wallpaper plugin

More than just a painting on the wall

As you might know, the very background of a Plasma workspace, a.k.a “wallpaper”, is painted by a special kind of full-screen applet, in Plasma terms “wallpaper plugin”. These wallpaper plugins not only allow to do static display of e.g. a given picture, but also some dynamically changing display, even interactively controlled by the user.
One can select the type of the wallpaper by selecting between available wallpaper plugins in the settings of the workspace. A default Plasma installation usually provides wallpaper plugins for at least the types “Color”, “Image”, and “Slideshow” (sources in plasma-workspace repository), and can also have “Picture of the Day” as well as the animated graphic wallpapers “Haneau” & “Hunyango” (sources in kdeplasma-addons repository).

Bring your own wallpaper

One of the Plasma concepts being customizability, one of course can write their own wallpaper plugin for a complete custom look and behaviour of the background.

So people have done. And not only for demoing the power of QtQuick2 and the OpenGL backends with some interactive fireworks wallpaper (sound effects there though left to user as by example of linked video 😉 ).
One can find e.g. wallpaper plugins like “Video wallpaper” or “Ken Burns effect slideshow” in the “Plasma Wallpaper plugins” category in store.kde.org. Or soon use (again) the Marble-based “World Map wallpaper” (sadly got broken unnoticed and only restored in time for KDE Applications 18.04). Or in the future find relaxation with the animated Asciiquarium.

Then there is also the Plasma wallpaper plugin example with animated falling tree leaves (sources in plasma-framework repository).

Templates for some DIY in the hobby room/garage

To help you implementing your own idea for a wallpaper plugin, the Plasma libraries part of KDE Frameworks are providing you with a Plasma wallpaper plugin template in the kapptemplate format, as supported by KAppTemplate or KDevelop. It is usually part of the additional development package in Linux distributions (e.g. “plasma-framework-devel”). Starting with upcoming KDE Frameworks version 5.45 this month there will be even two versions, the existing template for a QML-only version and one new template for a version where one wants to include other compiled code using an own QML extension plugin (get this template already here).

With such templates, an initial running version of your own wallpaper plugin is just a few steps away. Create a new project from the template, e.g. with KAppTemplate…

Creating a new Plasma Wallpaper plugin from a template using the KAppTemplate application

… then follow the README in the created sources to build and install the wallpaper plugin. Both templates generate some sample code which shows some configurable text in the middle of the wall, eh, background. So open the settings dialog, select the new wallpaper plugin, enter some text in the sample configuration field and apply…

Configure the new Plasma Wallpaper plugin

And then go and make the Plasma wall all yours 🙂

Three old Plasma Weather applet TODO items gone for Plasma 5.12

Just when I thought to have missed yet another Plasma feature freeze deadline with the one for Plasma 5.12 LTS and thus a good(?) excuse to re-decrease priority of some planned work on the Plasma Addons Weather applet (from the kdeplasma-addons repo, not to be mixed up with clearmartin’s one from github/store.kde.org) once more and thus delay things even further to a day that may never come, the Plasma team found they need to shift the deadline by some weeks to be after the KDE Frameworks 5.42.0 release.
So excuse gone, no other quickly found… time to do a git pull and open the editor.

It’s almost two years ago that the old Plasma Addons Weather applet got ported to Plasma 5 with an initial release in Plasma 5.6. That activity resulted in some plans for further work, which then though met a sad fate of plans… staying on paper to some degree. Let’s revisit the points of the plan and their state:

  • Breeze-style weather state icons: done -> hurra for hard-working Ken
  • Overhaul of look: only cosmetic changes applied, bigger redesign never turned into code -> FAIL
  • support for more weather data providers: a template for provider plugins has been done and added, but no-one ever contributed a plugin for a new provider -> FAIL so far
  • also temperature displayed in compact widget variant, like on panel: got lost in layouting code -> FAIL
  • privacy control which weather data providers are queried on finding weather stations: never worked on -> FAIL

Add to that a Plasma 5 Porting TODO item from the code:

  • Restore night-style icons for observation weather conditions at night: never worked on -> FAIL

Living in some slightly northern of the northern hemisphere, right now the days are short and the temperature is often around the freezing point. Which makes the weather applet look slightly broken and useless: not showing the temperature directly on the panel for a quick glance to check whether it is slippery outside, but showing the weather observation report with the sun symbol in the icon when it is dark outside… who needs or wants that. Still the applet is working too well for just proposing to wipe it from the repos in favour of one of the alternative ones out there. Of course there is also that tiny bit of pride in the porting work done, which begs for throwing more good time after it… 😉

So motivation collected, some coding time shuffled free: the fight against the new Plasma 5.12 feature freeze deadline was picked up. And to make the already too long story short, I can now happily report that with the help of Kai Uwe and some further random Plasma developers the last three items can now be checked off as Done starting with Plasma 5.12 🙂
(Well, almost, truth is that proper night-style icons are still not available for some stations/providers or delivered data, fixing needs a bigger redesign, which is left for another time)

Selecting which weather service providers to query for a location in the Plasma Weather applet. Spot also the optional temperature shown on both panels next to the weather state icon, as well as proper night-style weather state icon for England’s London during current CET night (sorry for German/English mix in UI, too sleepy for proper setup)

So some 2018 FLOSS contributions of mine done. Now I can slack off the rest of this year! 😛
And watch you doing yours by implementing a plugin for your favorite weather data provider?
Which, BTW, will be also useful to any other Plasma applet which makes use of the Plasma Weather dataengine from the plasma-workspace repo.

WIP: Plasma World Map Wallpaper & World Clock Applet, powered by Marble

The core of Marble, the virtual globe and world atlas, is a library, intended for reuse. Next to exposing its native C++ interface (see API dox of development version of the Marble library), there is also the option to use it in a QtQuick variant.

The Marble code repository itself holds a few application and tools based on the library. Additionally it also has extensions & plugins for other applications & workspaces, like the KIO thumbnailer plugins for previews of KML, KMZ, GPX & GEOJSON files in KIO-using file manager or file dialogs, a Plasma Runner plugin for looking up geo coordinates or a world clock Plasma applet.

Moving to Plasma5, Marble KRunner plugin arrives first

Having extensions for external applications & workspaces in your repo requires yourself to keep up-to-date with those externals. When Plasma5 appeared with the big switch to QML-only plugin architecture, that left the Marble-based plugins a little behind for now.

Good news is that the KRunner/Plasma Runner plugin was not affected by that, and with “KDE Applications 16.08” and the new Marble release will now also be out in a version working in all locales this month.

Reviving the Marble world clock plasmoid from 2009

The Marble world clock plasmoid, introduced already in 2009 (see bottom of page), though needs a full rewrite, from C++ to QML, which is a bigger undertaking. It also needs a port from KTimeZone & KTimeZoneWidget to QTimeZone, and in that course a cleanup of the mapping between time zones to geocoordinates.

Good news here is that some initial work has been done now and is up for review. A lot of the features are still missing, and there are some glitches (e.g. vertical offset, license info displayed). But it is a start, and the current state might be even fancy enough for some users already 🙂 So it should see a first release with “KDE Applications 16.12”.

It is a small mutation from a Plasma Applet to a Plasma Wallpaper

With the applet initially working, the idea came to have the map also shown fullscreen as wallpaper. While I could not find documentation how to do a wallpaper plugin, the existing code and examples though gave enough hints, and one hour later there was the first incarnation of a Marble-powered Plasma Wallpaper plugin.

See here a screenshot with both the World Map Wallpaper and the World Clock Applet in their current state:
Plasma World Map wallpaper & world clock applet, powered by Marble

Tell what kind of world maps you want to see as wallpaper

Because the World Map wallpaper can make full use of all Marble plugins, a lot of different kind of setups are possible:

  • Plain political map view
  • Globe view with stars in the background
  • Map view of just a continent/country
  • Satellite-photos-based view with live cloud rendering

There could be also plugin variants for the Moon, Venus or Mars.

So start Marble, play around with the settings to learn what is possible. Then tell in the comments what other kind of maps (or globe views) you would like to use for a wallpaper, so we could consider them as predefined settings at least.
As with the rewrite of the World Clock applet, a first release of the World Map wallpaper(s?) should happen with “KDE Applications 16.12”.

Create your own Plasma Wallpaper quickly by a new template

BTW, if you have other fancy ideas for Plasma “Wallpapers”, as by-product I did a template for Plasma Wallpaper plugins. It is currently up for review, so hopefully will be part of future KF5 Plasma frameworks releases. With that template, your first own wallpaper plugin is just a few clicks away e.g. in KAppTemplate or KDevelop.
Update: Until it arrives in releases, for now you can download the template file plasma-wallpaper.tar.bz2 from here and manually install it by moving that file into the folder /usr/share/kdevappwizard/templates/.
When playing around with the wallpaper settings, be aware there might be at least the issue of the wallpaper config page not reading current/default settings when switching the wallpaper type. As workaround, after switching the wallpaper type, one first has to close and reopen the dialog to be able to adjust the settings of the new wallpaper type.

Plasma Weather widget: code template available to add your favorite weather data provider

Quick recap

Plasma 5.6 has finally seen the return of the Plasma Add-ons Weather widget, which had been missing the port from Plasma4.
Next, the Weather widget does not talk to any weather data providers directly, instead it talks to a weather dataengine (currently part of the Plasma Workspace module), to query for any weather stations matching the entered location search string when configuring the widget and to subscribe to the data feed for a given weather station from a given weather data provider.
That weather dataengine itself again also does not talk directly to any weather data providers. Instead it relies on an extendable set of sub-dataengines, one per weather data provider. So-called “ion”s.

Currently there are only 3 4 ions part of Plasma: wetter.com (private company running wetter.com), envcan (Environment Canada, by Government of Canada), noaa (USA’s National Oceanic and Atmospheric Administration). Update: And bbcukmet (BBC Weather from UK MET Office).
That is not enough, right.

Get quickly started with a working template

Time to add an ion for your favourite weather data provider. An ion can be independently developed by everyone, no need to do this in the plasma-workspace module (though it would be great if your ion ends up there once it is working, so it can be shared more easily).

To allow you a quick start with your own ion development, for the next version of the Plasma, 5.7, a code template (in the kapptemplate format, as supported by KAppTemplate or KDevelop) has been added. So when installing the development packages for Plasma Workspace (e.g. “plasma5-workspace-devel”), there should be also a “Plasma Weather Ion Dataengine” code template available, in the “KDE/Plasma Dataengine” folder.

Until Plasma 5.7 is released, download a snapshot of the ion code template. This snapshot also works with Plasma 5.6. You will need to have the development packages for Plasma Workspace installed, so the “plasma/weather/ion.h” header is available.
To use the template with KDevelop, select in the menu “Project”/”New From Template…” and click the button “Load Template From File” to add the template to the list. Then select the template and follow the dialog.
To use it with KAppTemplate, you need to manually install the file in “/usr/share/kdevappwizard/templates/” and (for KAppTemplate before Applications 16.04) also add a dummy PNG file to “/usr/share/kdevappwizard/template_previews/“, with the same base name as the template, “ion-dataengine.png“.
If the template does not work for you (please tell in the comments if), download this sample ion zip file, made from the template and the name “trueweather”, and start from that.

Follow the “README” in the sources and learn how to build, install and test your ion dataengine, e.g. how to query it via the Weather dataengine with the Plasma Engine Explorer:
trueweather ion dataengine in Plasma Engine Explorer

Learn more details about the Plasma Weather dataengine system in the last blog post.

Do not hesitate to ask for help on the #plasma irc channel and the plasma-devel mailinglist.