This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How do I delete an entire workspace using js script?

Tags: None
(comma "," separated)
deepcode
Registered Member
Posts
4
Karma
0
OS
Good day everyone!

I'm working on a KDE (Kubuntu) respin and here's my question:

1. I have the following js script:
Code: Select all
var activity = activityForScreen(-1);
activity.remove();
var activity = new Activity ("folderview");
activity.writeConfig("alignToGrid", true);

it removes the current activity and adds a new one. I place it in the /usr/share/kubuntu-default-settings/kde4-profile/default/share/apps/plasma-desktop/updates folder and it works fine if I boot from this LiveCD.
But the script is completely ignored if I install the system on a HDD from this media. I put this script in the 'init' folder and it partially works but it does not delete the old activity (I assume there's a difference between an activity and a workspace 'cause removing the first one does not remove the secod one), it creates a workspace with the new one. Other custom scripts put into the 'updates' folder work fine in both cases.

2. Is there a way to remove the workspace (containment) completely, not the activity inside of it, cause I have the containment left in the 'activities' menu as I remove activity with the activity.remove(); command.

Thanks in advance!
deepcode
Registered Member
Posts
4
Karma
0
OS
False alarm, folks!

It looks like everything works slower being installed on HDD (especially in a VM) and I had 'locked = true;' in my last script. It looks like the previous scripts just can't finish the job they are to do before everything gets locked. :( Is there a way to wait until other scripts finish and then lock the desktop?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft