Make one system - Virtual Desktop or Activities

Never found a use for activities, another potential organizational layer. I don’t care about wallpaper as I never use the desktop, no icons, no files, three small autohide panels
I have a self imposed structure for 5 Virtual Desktops[vd], 3 with their own browser
I need either virtual desktops or activities to let me assign some specific apps to be anchored to a specific VD or activity, downloads going to different folders

Supposedly I can do this with windows rules, I can’t make any sense of the coding I would have to do, nor any particular desire to learn that language, lazy simple user that I am

1 Like

Another less mentioned aspect of Activities are unique sets of plasma widgets. When Latte Dock was still a thing, I used that to have completely different panel layouts on each Activity, including one with no panels at all.

Otherwise, even after 25 years of Linux/KDE usage, I never caught on to virtual desktops. My own usage and workflows have never seemed to benefit from them, but when Activities came out with KDE 4, it sort of clicked.

Per-task or job organization, as opposed to window organization.

I always saw Activities as unique sets of desktop layouts defined by wallpaper and widgets, which of course include virtual desktops.

(I do wish Activities and web browsers played nicely with each other)

4 Likes

Another less mentioned aspect of Activities are unique sets of plasma widgets.

Ah, good point!
Just realized I use this as well (different sticky notes per activity).

I do wish Activities and web browsers played nicely with each other

Indeed.

My current workaround is to have separate browser profiles for each Activity and start the respective profile manually in each profile.

I was considering to look into writing a wrapper script that would get the current activity name and then pass that to the browser start command, e.g. as the parameter for Firefox’s -P argument

3 Likes

Good idea, this would really help people using their computer for both work and personal, especially those times with remote working.

People are forgetting about window management differences between Virtual Desktops and Activities.

The most useful thing about Virtual Desktops, to me, is the fact that I can “hide” applications from showing up in my Alt+Tab, which is useful to optimize my window switching, especially when windows are maximized.

With a basic example, if I have Firefox, Kate, and Elisa running, and I’m working on Hugo stuff which requires looking at a web browser page and editing the contents in Kate, I don’t want Elisa to show up when I’m alt-tabbing. Hence, I can keep Firefox and Kate in a virtual desktop (so I can easily switch between them with Alt+Tab or Meta+Alt+arrow or whatever window switching I want, and Elisa in another (making sure Elisa never shows up when switching windows unless I want it to show up). If I actually want to check out Elisa, I intentionally switch between VDs.

The most useful thing about Activities, to me, is the fact I can “hide” virtual desktops, which is useful when I have a lot of apps and VDs. Hypothetically, say I have the following apps:

  • Firefox
  • Kate
  • Telegram
  • Neochat
  • Konsole (hacking on Neochat)
  • Feishin (music player for my Navidrome server)
  • Okular with music sheet open
  • KMail
  • Musescore (music sheet composer)
  • Steam

I can split those apps into Work, Music, and Leisure activities, while also using VDs to optimize my window switching workflow.

Work would have:

  • Firefox with KDE stuff in VD1
  • Kate in VD2
  • Neochat in VD3
  • Konsole in VD3
  • KMail in VD4

Music would have:

  • Musescore in VD1
  • Okular in VD1
  • Feishin in VD2

Leisure would have:

  • Firefox with YouTube in VD1
  • Steam in VD2
  • Telegram in VD3

This way, whenever I’m in the Work Activity, I don’t have to care about music-related stuff in VDs and I don’t get distracted by leisure-addictive stuff either (I figure it’s useful for ADHD probably). If I actually want to switch to composing music or get fully distracted with videos or games I intentionally switch between Activities.

I just type one keyboard shortcut and bam, all my Work apps on all VDs are hidden from me and all my Music apps on all VDs show up.

I can go further and hide (or show) apps from different Activities or VDs in the Icons-only Task Manager, change the launcher menu favorites per Activity, change the pinned apps on my panel per Activity, and other such things.

That’s the point to me: hiding things, optimizing workflows, not having to care about things that aren’t relevant to my current activity. The whole wallpaper and panel and recent files history features are just bonuses that improve the QoL of Activities, and you cannot simply move features from Activities into VDs or from VDs into Activites: they complement each other.

(These are hypothetical scenarios to showcase VDs and Activities, I don’t want workflow suggestions, for example I don’t actually use Konsole windows, I use Yakuake tabs, and I’m not delving into how apps running in the background and tray icons can bypass or supplement VDs/Activities :D)

5 Likes

I was considering to look into writing a wrapper script that would get the current activity name and then pass that to the browser start command

Not a full start script yet but that should determine the current activitiy’s name

#!/bin/sh

SERVICE_NAME=org.kde.ActivityManager
SERVICE_PATH=/ActivityManager/Activities
SERVICE_IFACE=org.kde.ActivityManager.Activities

CURRENT_ACTIVITY=""

# determine current activity via busctl
current_activity_busctl()
{
    ID=$(/usr/bin/busctl --user call $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE CurrentActivity | cut -d ' ' -f 2 | sed s/'"'//g)

    CURRENT_ACTIVITY=$(/usr/bin/busctl --user call $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE ActivityName s "$ID" | cut -d ' ' -f 2 | sed s/'"'//g)
}

# determine current activity via dbus-send
current_activity_dbussend()
{
    ID=$(/usr/bin/dbus-send --print-reply=literal --dest=$SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.CurrentActivity | sed s/' '//g)

    CURRENT_ACTIVITY=$(/usr/bin/dbus-send --print-reply=literal --dest=$SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.ActivityName string:"$ID" | sed s/' '//g)
}

# determine current activity via qdbus
current_activity_qdbus()
{
    ID=$(/usr/bin/qdbus $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.CurrentActivity)

    CURRENT_ACTIVITY=$(/usr/bin/qdbus $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.ActivityName $ID)
}

# determine current activity via qdbus6
current_activity_qdbus6()
{
    ID=$(/usr/bin/qdbus6 $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.CurrentActivity)

    CURRENT_ACTIVITY=$(/usr/bin/qdbus6 $SERVICE_NAME $SERVICE_PATH $SERVICE_IFACE.ActivityName $ID)
}

# check tool availability
if [ -x /usr/bin/busctl ]; then
    current_activity_busctl
elif [ -x /usr/bin/dbus-send ]; then
    current_activity_dbussend
elif [ -x /usr/bin/qdbus ]; then
    current_activity_qdbus
elif [ -x /usr/bin/qdbus6 ]; then
    current_activity_qdbus6
fi

# output for debug
#echo $CURRENT_ACTIVITY
1 Like

Activities are amazing as they are, with a couple issues as I see it…

I don’t really like how the virtual desktop stays set to a desktop number when you switch activities, they should be independent so if you are on virtual desktop 2 of activity 1, and then switch to activity 2, you’ll be on desktop 1… and then it remembers in activity 1 you were on desktop 2 when you switch back.

The other thing is the pinning of apps to the icons-only task manager doesn’t work right with activities. if you set apps to be visible differently across activities, and then try to change their ordering, they get all scrambled. I have fixed this on my system by running a script that fixes the order consistently across all activities. Any time I change my things and they get scrambled I use the script to fix the ordering in plasma-org.kde.plasma.desktop-appletsrc. but this really shouldn’t be necessary. one of the best things about activities is having a whole different focus of your work, so changing which apps are visible is pretty important imo.

3 Likes

You might be able to do that a bit faster with a desktop automation tool like AutoKey if you are on Linux. It can fill in things and perform actions all triggered by pressing a hotkey (keybpard shortcut). Similar tools exist on all mqjor platforms.

1 Like

I have been using virtul desktops for over a decde and love them. I have 8:
Terminal
Dolphin
Vivaldi
Thunderbird
and the rest for various related tasks.

Almost all of that goes away when I switch from my default activity to my crypto activity which has a ton of icons that launch things tat are crypto only. I love it.

2 Likes

You can bind a window to one activity or t o all activities’. It would be nice to be able to bind them to more than one activity without having to bind it to all of them.

I think that is possible, at least at runtime and with KWin window rules.

For example this browser is shown in two of my activities (“Main” and “KDE”).

When you go to the window menu (right clicking the title bar or Alt-F3) the “Show in Activities” sub menu (which is also used in the window rules UI), has multiple choice options for when you do not select “All Activities”.

1 Like

Some thoughts on fleshing out the pitch:

Activities should be a more powerful version of “focus modes” from iOS

Here’s how I use focus modes:

  1. I use these to silence notifications from work (by muting slack/outlook online notifications) while at home and less urgent personal notifications while at work
  2. I customize the applications suggested in search and the icons on my homepage so that tools like travel apps are quick at hand while traveling
  3. I change the wall paper and lockscreen to remind me what to focus on.
  4. I activate these automatically based context like time, calendar events, and location

Activities currently can only do a subset of this as far as I know.

In principle I like the idea of being to customize XDG locations based on focus modes with a UI to choose to manage symlinks to other Activities or perhaps just for specific apps.

The problem still exists that there is no goo, short elevator pitch for describing Activities. I have not come up with anything myself with some random pondering on the topic for quite a few years.

Collections of unique desktop configurations, including wallpapers, widgets, and virtual desktops, with separate settings for things such as power, etc etc…
and still missing key items (task manage item visibility, etc)

Virtual desktops are easier: extra places to put your windows :smiley:

I am using Activities like the described focus modes since its “invent”. I have Activities for “private”, “work”, “data analysis” and “financial” tasks). I have a folder-view on each Activity desktop providing shortcuts to files and folders that I need for this very activity, I have different power-management setups, different wallpapers, different favorites in the application launcher. This is one major point that improves my workflows when using KDE.
I never used virtual desktops.

1 Like

For me activity like a screen session, virtual desktop like a tile inside this session.

On Gnome and Windows I’ve used virtual desktops. But on KDE I switch to using Activities. With one virtual desktop per activity. Now i have (as described earlier by other commenters) main/work/entertainment/etc, “virtual desktops/screens” (activitities in fact). I like feature of activities to have separated set of opened app, wallpapers, settings and other. I want just one new feature to be implemented in activites — different sets of panels.

For example, I need app panel only on main and work screen. But on next screen, where only single chat application works, I don’t need any panels. Current abilities of Plasma doesn’t allow to remove panel from one activity — panel removes from all activities. I hope to find a temporary solution for it in future.

i still think the best pitch for Activities is that it should provide the ability to switch “users” without having login, and each activity still has access to all the same user data and installed applications.

each activity can have their own set of config files that customize the entirety of the KDE plasma desktop to their liking and needs.

for this to work there would need to be some kind of activity profile manager where you can clone and customize each set of configurations.

this would also provide the ability to back up and import an entire KDE configuration as a bonus (a long over due feature, imho).

2 Likes

What about: “Change how KDE looks and reacts to your applications to fit your tasks. “

Most tasks require more than one application. With activities you can provide custom global shortcuts, curated notifications, relevant information in widgets, and customize configuration to help you be more productive and focus on what’s important.

Examples:

  • A travel Activity that provides quick access to travel information with widgets.
  • A presentation Activity that increases font sizes, improves color contrast, and sets do not disturb
  • A work Activity that queues notification from distracting sources
  • A personal Activity to keep better work life balance by hiding work apps

I think explaining it as a separate “sub user” is confusing, and won’t make sense to anyone who is not intimately familiar with how this is implemented, and maybe more confusing to those who know about things like subuids and subgids used in containers.

2 Likes

We know from several people that the desktop component of Plasma seems to be activity aware (different icons on desktop, different background, different folder-view, different stick notes, etc).

So the question is has this component added something to support that or does the component responsible for panels not use it.

Might this be something for the Plasma team to look into @ngraham?

This is a good idea :+1:t2:

At the moment no one is actively working on the Activities feature to my knowledge. I wouldn’t expect any massive changes soon — especially before the feature’s scope and expected UX are a bit better defined.

2 Likes