What we plan to remove in Plasma 6

You can set it so that scripts run when an activity is started, stopped, switched (activated) and switched away from (deactivated). It’s a bit of a hidden feature though.

To use, open a terminal and type

kactivities-cli --list-activities

This will show you them listed with a long id number separated with four hyphens. Then navigate from your home folder to .local/share/kactivitymanagerd/activities/ (you might need to create folders if they don’t exist)

Create a folder there named the long id number of the activity you want to do scripts for. In that folder create four folders called activated, deactivated, started and stopped. In those folder you can place scripts that trigger at the equivalent moment.

4 Likes