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

Complete isolation of Activities, like separate OSes

2

Votes
2
0
Tags: activities, dolphin activities, dolphin activities, dolphin
(comma "," separated)
User avatar
lava
Registered Member
Posts
18
Karma
0
OS
Hi!
I want Activities to not "communicate" with each other like when I open files from current Activity they won't open in other Activities.
Currently if I open a text file(default program for that type is Sublime Text) it'll be opened as a tab in another Activity with a running instance of Sublime Text. The same with Vscode, Firefox, Dolphin.
An example with Yakuake and Firefox. I have a different Activity for a web development. I go to that Activity and type in yakuake yarn start and it opens a new Firefox tab in my Default Activity which is not what I want. That happens despite my Web Development Activity having an already running separate window of Firefox.

If you had Ubuntu and Manjaro in Virtual Box and you open a text file in Ubuntu it'll be opened in Ubuntu(not Manjaro) on a new instance of say Sublime Text. I want this behavior in Activities.
Lachu
Registered Member
Posts
864
Karma
1
OS
About Firefox. This is hard to realize. Many years ago, I read Firefox sources and discovered FF creates X11 Atom (probably) telling about process, which runs Firefox binary.

To made separation possible, somebody should modify FF sources or write addon to integrate with activity.

Another solution is use one of many script to ran separate profile of FF for each activity.
There you are one of my creation:
Code: Select all
#!/bin/bash
if [ "$1" == "" ]; then
  a=www.google.com
else
  a="$1"
fi
nazwa=`qdbus-qt5 org.kde.ActivityManager /ActivityManager/Activities CurrentActivity`


if [ "$nazwa" == "Activity_number_connected_with_default_FF_profile" ]; then
  firefox -P  Default_FF_Profile_Name --new-tab "$a" &
  exit 0
fi

if grep "\[$nazwa\]" $HOME/.mozilla/firefox/profiles.ini; then
 echo
else
firefox  -CreateProfile "$nazwa"
fi
firefox  -p "$nazwa" --new-tab "$a" &


To obtain Default Activity ID, switch onto it, ran terminal and paste (and press enter):
Code: Select all
qdbus-qt5 org.kde.ActivityManager /ActivityManager/Activities CurrentActivity


You can obtain default FF profile by running FF on it and type about:profiles

In place of running normal FF, you must ran my script. You can save it somewhere, go to systemsettings5 and set it as default browser.


Lachu, proud to be a member of KDE forums since 2008-Nov.
User avatar
lava
Registered Member
Posts
18
Karma
0
OS
Lachu wrote:To obtain Default Activity ID, switch onto it, ran terminal and paste (and press enter):

You mean Current Activity.

Another solution is use one of many script

Give me plz link to those scripts. Maybe there are useful scripts out there also there's a "Run script" option in "Activity Power Settings".

It would've been nice if there was default applications option for each Activity.

Firefox is the least annoying of all. Dolphin the most, then Sublime, then Vscode. Any idea for those?
Lachu
Registered Member
Posts
864
Karma
1
OS
lava wrote:
Lachu wrote:To obtain Default Activity ID, switch onto it, ran terminal and paste (and press enter):

You mean Current Activity.

No. I mean default activity. I wrote "switch onto it". You need to connect one activity with your current/default FF profile. And I called this activity default.
lava wrote:
Lachu wrote:Another solution is use one of many script

Give me plz link to those scripts. Maybe there are useful scripts out there also there's a "Run script" option in "Activity Power Settings"

For FF search for Nepufox or Firefox + Plasma + Activities..
lava wrote:It would've been nice if there was default applications option for each Activity.

Agree.


Lachu, proud to be a member of KDE forums since 2008-Nov.
User avatar
lava
Registered Member
Posts
18
Karma
0
OS
At least changing Dolphin would be great. If I have 2 activities with different desktop folders specified. If I open a desktop folder from current activity it opens in another activity which is stupid :-\ .

If that's impossible then "Default Applications" for each Activity would be nice.

Let's vote this feature. Thanks.
User avatar
lava
Registered Member
Posts
18
Karma
0
OS
Dolphin works as expected now. Probably closing and opening a new instance in current activity helped xD

There's an issue with activities remembering "Show in Activities" -> "Add to current Activity. Whenever I enable some programs to show up in all activities after reopening that program it shows up in only one activity. It would've been nice If they remembered their activities.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]