Outside the Stellarator

After having spent a great deal of time improving Plasma, I recently focussed on other ares of our workspace, such as KRunner, and various KDE Applications.

Plasma Desktop with KRunner
Plasma Desktop and KRunner with a cleaner look

One of my favorite and most frequently used tools is KRunner, the “Run Command“, “Alt+F2” (new in Plasma 5: Alt+Space) window. Last summer I re-introduced the history functionality and recently additional runner actions. KRunner’s history has become a bit smarter, prefering more recently executed queries over older ones, rather than matching length-wise. With runner actions I was able to implement a more than 5 year old feature request: showing the containing folder of a file found through Baloo (Nepomuk back then).

To make it even more convenient, rather than just opening the file’s parent folder and having you dig through the files in there to find it, I made use of the freedesktop FileManager1 interface that Dolphin (and Nautilus) support to have the file scrolled to and highlighted.

So, if you’re maintaining an application that does the “Open Parent Folder” dance, please use this. If you’re using KDE Frameworks in your app, you can eventually make use of the KIO OpenFileManagerWindowJob I’m currently working on.

I’m also planning to add support for Windows and OSX for this. Drag and drop is also implemented in KRunner, you can search for files and applications and drag them wherever you like.

Remembering where a file was downloaded from

Dolphin gains the ability to display the URL a file was originally downloaded from. While this feature itself existed for years (it’s the ominous “Copied From” attribute in Dolphin’s Additional Information view settings), this new implementation uses the standardized freedesktop.org Common Extended Attributes, also used by Baloo for storing tags and ratings. The “user.xdg.origin.url” is populated by applications like Chromium and even wget.

Dolphin showing the file origins in the Downloads folder
Dolphin showing the file origin URLs in the Downloads folder
Dolphin’s sidebar showing additional file information, including the clickable origin URL
Dolphin’s sidebar showing additional file information, including the clickable origin URL

Once again, if you’re maintaining an application that downloads stuff, do your users a favor and set this attribute accordingly. There’s also a neat KDE Frameworks API which does the right thing™ for you:

KFileMetaData::UserMetaData metaData(filePath);

Global Menu Applet

Yes, that’s right. I recently had a look at the Global Menu stuff we get asked for a lot and I managed to write a working, albeit ugly, prototype. At the moment its use is quite limited, as the only application I could find that makes use of it was Chromium.

Plasma 5 Global Menu Applet showing Chromium’s menus
Plasma 5 Global Menu Applet showing Chromium’s menus

The good news is that there’s an ongoing effort to upstream support for it into Qt which means all KDE and Qt applications will eventually support this! The bad news is that Gnome uses their own thing, GMenuModel, whose DBus interface is deemed non-stable, so we can’t really support it. Furthermore, it looks like Unity will also use GMenuModel instead. Also, it will take quite a while for the Qt version with support for it (I hope 5.7) to be widely adopted, so you’ll need to wait at least another half a year, probably more, for this.

*) A stellarator is a device used to confine hot plasma with magnetic fields in order to sustain a controlled nuclear fusion reaction. (Wikipedia)

14 thoughts on “Outside the Stellarator”

  1. wow! i love you work .. not only this one but the last ones too. you do one of the best things by take the “smaller” things to do and make it work instead of (re-)write an application. THANKS!

    one last thing i would like to see is that the dolohin sidebar informations and features are also available when you rightclick on a file and go to properties. i havily use tags in dolphin but its also PITA to set tags to new files on a “singleclick” system with a sidebar only…

    1. I miss that too and actually had a look at it. The problem is that the file dialog comes from KIO in KDE Frameworks whereas the Dolphin stuff is in a library outside of Frameworks, so it cannot depend on it. That’s also the reason this information is no longer shown when overwriting a file during a copy operation.

    2. You are right: One way or another, we definitely have to make tagging far far easier if we ever want to see it widely adapted.

      It’s a bit of a chicken-and-egg problem, or actually a bit of a vicious circle: Tagging is terribly under-exposed in Dolphin (and also in the File-Open and File-Save dialogs!!!), so few people use them, so developers think it’s not worth investing in them.

      We can only break this circle by exposing tags far better everywhere people deal with browsing the file system, both in adding tags and in filtering by tags.

      Oh and you are also right in that Plasma has to be eternally grateful for Kai’s amazing work and attention to detail!

      1. First, thanks for the amazing work! :)

        Second, I’m also interested in a (far!) better tagging system for Dolphin (and also in other applications of course). Some time ago I thought about it and added a to-do [1] about making the tagging and rating functionality accessible via the context menu, maybe this could be one small step into a wonderful world full of tags? ;)

        [1] https://todo.kde.org/?controller=task&action=readonly&task_id=875&token=da7df1fc1ad28020080cefb8a760d1f78b855d01fdac13e641bfede89c97

  2. As usual, STELLAR contributions. I really love how pPlasma is evolving. Thanks, thanks and thanks.

  3. My biggest gripe with the prior version of the global menu applet was that the text looked like garbage on most themes, and would have benefited immensely from a different font and bigger size. I assume it inherited from the theme, but I couldn’t figure out how/where.

    So it would be immensely appreciated if you could write inheritance from the primary font config, or provide fine-tuning within the applet itself, or at the very least, document how it can be themed.

    Thanks for the hard work. Your screenshot looks much more elegant than the old version. Also, screw Gnome. Hopefully Unity’s switch to Qt will encourage the major apps to jump ship and fall in line behind proper implementations.

  4. There are great things going on for my favorite desktop environment. This and the fact that we might switch from MS Windows to KDE at work makes me wonder if I manage to become a KDE hacker again as in the good old days.

  5. > Furthermore, it looks like Unity will also use GMenuModel instead.

    Unity already supports both. In my opinion dbusmenu is much more suitable for classic application menus than gmenumodel (which is mostly for GNOME-style apps with a single small menu).

  6. Finally global menu goes upstream.
    Now i wish the same thing would happen and we would get “manually grouped apps in the taskbar” back. tabbed windows for grouped apps and the hability to select an entire (ordered by name, for example) group in dolphin by clicking on the group title would also be nice

  7. HI. i just recently fully moved to kde instead of gnome and i’m really missing the global menu applet/plasmoid after a lot of search i found your blog. I just saw the the patch was merged. is there any place where i could get the working code for the plasmoid? thank you for your work. i’m really missing this feature and i know there’s a lot of more people who are also waiting for it.

Leave a Reply

Your email address will not be published. Required fields are marked *