Launch new instance when there is no instance open on current workspace

I am struggling with organizing my workspaces. I have one workspace per Project I am working on. Some applications I can fix to a single workspace, since they are only needed for a single project. Others (like Firefox) I need on all workspaces. Now, when I open Firefox from a workspace that does not have a Firefox instance in it, I am either taken to a workspace with a Firefox instance or a new Firefox instance is launched.

How can I always launch a new instance, when there is none in the current workspace? Turning on the "Launch new instance" plugin in gnome-tweaks launches new instances even if there is an instance open in the current workspace.

Basically, when I open Firefox (or any application that is not fixed to a workspace), I want the following to happen:
Is there an instance running in the current workspace? -> Give focus to that instance
Otherwise, launch a new instance in the current workspace.

How can I achieve that?

2

2 Answers

You need to "isolate" your current workspace. You can do that by using the Workspace Isolated Dash GNOME shell extension for example. However, since Ubuntu nowadays (version 17.10 and later) comes with Ubuntu Dock (a fork of Dash to Dock), you can activate this by simply running the following command in Terminal, no need to do anything extra:

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
3

dconf-editor

in Ubuntu 20.04 LTS,
dconf-editor seems powerful (than gnome-tweaks)
and easy to use (than gsettings or dconf).

the workspace related options:

  • /org/gnome/shell/extensions/dash-to-dock/isolate-workspaces
  • /org/gnome/shell/app-switcher/current-workspace-only
  • /org/gnome/shell/window-switcher/current-workspace-only

Run dconf-editor, press Ctrl + L to input location path.


screenshot:

dconf-editor.png

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like