Make Linux KDE Plasma Activities Work for You



KDE Plasma “Activities” are a great idea. The idea is that you can collect a number of applications and files in a group, present them together, and not be distracted by a host of other objects irrelevant to that Activity.

They are a superset of “Desktops”,in that they can contain a number of Desktop configurations.

We define a number of different activities with a nickname and keyboard shortcut, create the activities, and populate each Activity with a shell script stack and control the individual application instances with the KDE Window Rules system settings.

Creating Activities

We defined the following activities:





Computer Administration






Software Development





















News and Weather












Activities Manager

We create the activities using the KDE Activities Manager. We access it by right-clicking the desktop and choosing the Activities entry. You can also add the Activities Manager to the task bar.

Scroll to the bottom of the Activities Manager and click on + Create Activity… It brings up this screen (Plasma 5):

  • Assign an icon

  • Do not assign a shortcut in this dialog. These do not work.2

Keyboard shortcuts

Creating keyboard shortcuts is a matter of first creating the Activity then using the Desktop Bus (dbus) to find its 32-character hexadecimal Globally Unique Identifier (GUID), then assign a keyboard shortcut to the GUID.

Finding the GUID

This link was very helpful:

Current Activity GUID

This command lists out the GUIDs for the current Activity:

org.kde.ActivityManager /ActivityManager/Activities CurrentActivity

All activities GUIDs

This command lists out the GUID for all activities:

org.kde.ActivityManager /ActivityManager/Activities ListActivities

The list is ordered by the activities in the Activity manager at the time the command was invoked, so use the Activity Manager to step through each Activity and get its GUID with the previous command..

You then have a nice table when you’re done:

Assigning keyboard shortcut

Now you have everything you need to create a keyboard shortcut for an Activity.

1. Go to

System Settings → Shortcuts → Custom Shortcuts

2. Click on

Edit → New → Global Shortcut → D-Bus Command.

3. Enter a name for the shortcut.

In the Trigger tab, click on the button that says None and press the shortcut you want to use

(e.g. Ctrl+Alt+w).

4. In the Action tab enter the other fields:

Remote application: org.kde.ActivityManager

Remote object: /ActivityManager/Activities

Function: SetCurrentActivity

Arguments: The GUID from the first step, e.g.:


5. Click on Apply

Assigning Applications

Application types

It turns out that there are (at least) four types of applications for each Activity.

  • Activity-specific applications are those that are used in only in a particular Activity. There are a host of these.

  • Multiple-Activity applications are those that are used in more than one but not all activities and need to show different content depending on the Activity.

These include:

Evolution Different views (Inbox, Calendar, Tasks) to be loaded for each Activity

LibreOffice Calc Different spreadsheets for each Activity

  • Common applications are those that are used in all activities but need to show different content depending on the Activity.

These include:

  • Chromium Different url_[Activity].txt to be loaded for each Activity

  • Geany Different Project to be loaded for each Activity

  • Konqueror Different Profile to be shown for each Activity

  • Core applications are applications that must appear in all activities with the same content when switching between activities.

These include:


We then configure each Activity for the four types of applications. This is done with a series of scripts:

The scripts are discussed in more detail here.

The core applications are defined by the KDE Autostart that starts them when the system boots up and then the Window Rules (below) assign them to be Forced to All Activities. So we do not need any script to start these.

This successfully results in having each Activity populated with the desired Activity-specific, multi-Activity, common, and core applications and use cases.

Window Rules

We still have a problem after all that work of having application profiles appear in the wrong Activity.

The solution lies in fully understanding KDE Plasma 5 Window Rules. You can use these rules with sufficient granularity to ensure that your particular application’s use case appears where you want it to appear and nowhere else.

Accessing Window Rules

You can either right-click on a window title bar and choose

More actions → Special application settings

or use the Kicker:

System Settings → Workspace → Window Management → Window Rules

You can define a different rule for a host of different windows here.

Each rule has a host of settings and tabs, but it turns out that only a few matter in this regard.

Window matching tab

The first is the Window Matching Tab:

The Windows Matching screen has three key fields: Description, Window class, and Window title:

The first step is to assign a unique identifier in the Description field, or else you’ll drive yourself nuts with zillions of “Application settings for [application]”, which is to what it defaults.

The next step is to fill in the Window class field. If you come in from the title bar it is already filled out for you (recommended) otherwise you will have to find the right identifier.

Finally you need to decide how to modify the Window title field:

    • Core and Activity-specific applications require no further specification here since they have been fully defined for a Force assignment.

    • Common and Multi-Activity applications must use Window title: Substring Match to define a piece of the Window title that uniquely identifies the particular instance of an application that you wish to assign to a particular Activity.

Size and Position tab

The Size and Position tab has one key field: Activity.

It is modified as follows:

    • Core applications are set to Force: All Activities

    • Common, Multi-Activity, and Activity-specific applications whose Window title has been defined as above then use: Force:[Activity]


Activities are a powerfully useful concept for making work flow more efficient and saving time.

But there is sparse documentation on how to.

We have successfully run this gamut. We hope that this presentation will make life easier for others, and perhaps help the developers in automating this process further.

Like anything else:

“Easy when you know how.”

1C. Andrews Lavarre
Privus Technologies, LLC
EIN: 46-5240799
RI Entity ID: 875119
P.O. Box 606
Newport, RI 02840-0006
(401) 339-7189