Getting Ready for LTS

Plasma 5.8 will be our first long term support release of Plasma 5 and together with Qt 5.6 also being an LTS release this makes for a rock-solid combo. Let’s have a look at some of the tweaks I did on the occasion.

Task manager drag and drop

I recently stumbled upon a feature request about the ability to drop files onto a task manager entry to have the associated application open them. You can pin applications to the task manager after all, so why would those launchers behave differently from other application icons?

https://youtube.com/watch?v=WHx5J_W4fqo

Dropping application shortcuts, for instance from Kickoff, will pin them as launchers, instead. Also, hovering a task entry whilst dragging something will still raise the respective window to the front.

Improved right-to-left languages support

One area that had been quite neglected is support for right-to-left languages, such as Hebrew, mostly because none of us Plasma core developers are native to such writing systems.

Over the past weeks I fixed many glitches when plasmashell run in “mirrored” mode, such as:

  • System tray, applet popups and config dialog contents not being mirrored
  • The panel pushing widgets out the right side of the screen when widgets are locked
  • The calendar being messed up

QML fortunately makes it easy to mirror your layout using the LayoutMirroring attached property which flips horizontal anchors (left anchors become right anchors and vice-versa) and the order in which items are laid out in a Row:

LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true

“childrenInherit” lets it propagate this to all child elements. Since it operates on a per-scene basis, enabling this on the panel does not propagate to popup windows. You still need to take layout direction into account when positioning items manually with the “x” and “y” properties.

Want to help? Just run plasmashell (or any Qt application for that matter) with the “-reverse” parameter and report bugs and send patches!

plasmashell -reverse

Note: If your applications did not automatically mirror, make sure the Qt translations package (e.g. qttranslations5-l10n in *buntu) is installed. QGuiApplication’s layout direction detection (say that five times in a row) decides based on a “translate this as 1 if this is a right-to-left language” string which requires the aforementioned package to work.

Some media controller goodies

One of my favorite features in Plasma is the media controller applet that lets me control my music. This is probably why I constantly tweak and improve it. Here’s some neat tricks that you can do with the media controller:

  • Middle click the icon to pause/unpause
  • If you have them, use your forward/back mouse buttons on the icon to change tracks (new in Plasma 5.8)
  • While the popup is open, you can also use various keyboard shortcuts, such as:
    • K or space: play/pause
    • P or N: go to previous/next song
    • Left/right arrow / J or L: seek back/forward
    • S: stop playback
    • numbers 0 through 9: seek to 0%, 10%, 20%, etc of the current song

Did you know that you can use your mouse wheel on the particular icon to adjust volume or screen brightness? Middle clicking the volume icon will also mute and unmute.

In the applet’s context menu you can, provided the player supports this, bring its window to the front when minimized. Unfortunately, VLC player does not support that. However, since I’ve always wanted to know what a media player looks like on the inside, I cloned VLC player’s git repository and submitted my first patch there, fixing said feature.

16 thoughts on “Getting Ready for LTS”

  1. That’s awesome! It would be nice as well to be able to arrange the open windows in the taskbar by dragging and dropping them. Just as with tabs in the browser.

    1. You can already do this if you enable “Manual” sorting in task manager settings.

  2. I always enjoy reading about your contributions. Your VLC patch is nice, because it shows the power of open source – you can fix your itches.

  3. Thank you for your work, Plasma 5 is imho a great piece of software.

    And thanks for the tip about middle clicking the media control icon to pause/unpause, I didn’t know about that (and that Clementine supports it, too). I have to admit that I somehow think that the media control applet is redundant when a media player is minimized to the systray, as there are now two icons which provide more or less the same functionality, though I like that the applet behaves the same regardless which player I’m using at the moment. If the media control icon supported changing the player’s volume when using the scroll wheel on it (like Amarok and Clementine), it’d “replace” the media player’s icon in the systray for me. (Bonus: also (optionally) indicate playback progress in the icon)
    I liked it when the media controls have been added to the task manager tooltips, but when the media player is minimized to the systray, you don’t have the tooltips. It’d be cool if the media control applet also had media controls in its tooltip.

    Also thank you for adding the option to restore all windows of a group when middle clicking a group in the task manager (I have patched my task manager, though, such that it happens on left click instead); this feature (and the lack of agenda view) were the reasons why I was still using Plasma 4 on my Notebook. One thing annoys me, though: When restoring a group, the windows seem to be stacked in the order they were opened, but imho stacking them in most recently used order makes more sense (so eg. when restoring a group of browser windows, the last used window will be focused); the smooth tasks plasmoid for Plasma 4 used to behave like that.
    I also like the highlight window effect, but I don’t like windows to start flickering as soon as I hover over a task manager entry. A small delay or the option to highlight only when the mouse hovers over a windows preview would be very nice.

    1. there are now two icons which provide more or less the same functionality

      I don’t consider applications in the system tray a valid use-case, so if a player does that, it makes it redundant with media controller indeed.

      If the media control icon supported changing the player’s volume when using the scroll wheel on it

      I wrote a patch for that at one point but didn’t bother as we have per-application volume controls through the volume applet and I didn’t want to add yet another way of screwing with the already way too complex volume behavior.

      also (optionally) indicate playback progress in the icon

      Playback progress? What do you mean? Playback state at least is indicated by the icon (it’s either a “playing” or a “paused” icon)

      When restoring a group, the windows seem to be stacked in the order they were opened, but imho stacking them in most recently used order makes more sense

      Can you please file a bugreport/wish on bugs.kde.org for that, blog post comments are usually not the best place to keep track of those things ;)

      1. (Sorry for the late reply …)

        > I wrote a patch for that at one point but didn’t bother as we have per-application volume controls through the volume applet and I didn’t want to add yet another way of screwing with the already way too complex volume behavior.

        But scrolling about the media player applet is way faster than clicking on the volume applet and looking for the right control. And since volume can be adjusted using mpris (I just tried qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Volume .2), I felt like it is not too complicated to implement it. (I would probably try to patch the applet myself once I have enough spare time again.)

        > Playback progress? What do you mean? Playback state at least is indicated by the icon (it’s either a “playing” or a “paused” icon)

        The orange part of the Clementine systray icon indicates how long the not yet played part of the currently played song is: http://gulp21.bplaced.net/clementine_systray.png (Amarok used to have the same feature – it’s not very important, but nice to have)

        > Can you please file a bugreport/wish on bugs.kde.org for that, blog post comments are usually not the best place to keep track of those things ;)

        Done. https://bugs.kde.org/show_bug.cgi?id=368867

    1. Can you make sure the qttranslations5-l10n package is installed in neon?

      If it is not installed by default, can you please open a bug report against KDE neon on the KDE bugtracker? Thanks.

      1. I found this:
        qttranslations5-l10n in KDE Neon is on version 5.5.1 but its should be 5.6

        I install qttranslations5-l10n 5.6 form ubuntu 16.10 repo and its work.

        thank you for all!
        I report bug now

        1. I just did. However, this is usually the maintainer’s task and I’m not really involved in KDE neon. Nonetheless, I experienced the very same bug when trying to figure out why automatic layout-mirroring didn’t work out of the box.

  4. Hello

    I have some bug about RTL support, but nobody try to resolve them
    I know this is a opensource project and I fix some of the bug myself but I don’t know how to fix all of them

    This is my last bug: https://bugs.kde.org/show_bug.cgi?id=376114
    I found out the source of the problem but I just don’t know how to fix it, I would be happy if you can take a look.

    Where can I talk with kde developers and getting help about kde development? I want to do more for the project, but I don’t know where to ask…

    Thank you

Leave a Reply

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