Is it possible to have the opened applications of the current workspace in the launcher but not the ones from other workspaces?
4 Answers
For Ubuntu Dock shipped with Ubuntu 17.10 and later (with GNOME)
Well, Other answers are pretty old, so I think it is worth to add up-to-date answer. It is possible to do so right now and not too hard tbh (With Ubuntu 17.10 and it having Gnome).
Just use dconf-editor:
sudo apt install dconf-editor
Navigate to org > gnome > shell > extensions > dash-to-dock and check isolate-workspaces

- 943
-
2the question has absolutely nothing to do with the Dash To Dock Gnome Extension. the question is about Unity Launcher, which Dash To Dock isn't even compatible with Unity. – crookedleaf Feb 07 '18 at 23:26
-
4@crookedleaf Ubuntu switched to GNOME with a rebaked dash-to-dock as default with 17.10. – Seth Aug 23 '18 at 15:53
-
1@Seth But OP is using Unity, not Gnome. So either OP just used the "Unity" tag accidentally, or they are using an Ubuntu version with Unity. – crookedleaf Aug 23 '18 at 19:13
-
5@crookedleaf Or we just need to keep questions updated so they have the latest answers too :) – Seth Aug 23 '18 at 19:24
-
2Works great in 18.04 /w gnome. Thanks! Note the extension can also be easily installed from the website: https://extensions.gnome.org/extension/307/dash-to-dock/ – Jeff Ward Apr 16 '19 at 22:23
-
1I don't know if this answered the question asked, but it certainly answered the question that I googled... – carbocation Dec 20 '19 at 13:00
-
Cool! With
isolate workspace
from dconf editor, now I can ungroup windows of same app! – Nam G VU Oct 04 '20 at 13:55 -
5
-
4No need to install dconf editor. Just run
gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
. Works great with 20.04. – PerlDuck Feb 16 '21 at 15:25 -
How to make applications untraceable on (other) workspaces
Using xdotool
's windowunmap
, it is possible to hide a window completely. The window, nor its application, occurs any more in the launcher icon, and is not even listed any more in the output of wmctrl
.
Theoretically, this could be connected to the "workspace-engine", that was used in this and this answer. That would have been the most elegant solution.
However, the process of only hiding windows on other workspaces and to automatically raise the ones on the current workspace is too demanding to use in an ongoing background script (for now), and not unlikely "to catch a cold" as well. Since windows are lost for good in case of errors, I therefore decided not to offer the procedure as an automatic (background-) process.
If this answer is nevertheless useful for you or not depends on the situation, and the reason why you'd like to hide icons of applications, running on other workspaces; the decision is yours.
The solution; what it is and how it works in practice
A script, available under a shortcut key, seemingly making all windows on the current workspace (and thus applications) disappear completely. That means the application's icon in the Unity launcher shows no activity of the application:
Three running applications:
After pressing the shortcut key:
Pressing the schortcut key combination again, the windows and their applications will re-appear.
- Since the key combination will only hide the windows and applications from the current workspace, you can subsequently switch to another workspace without a sign of what is (hidden) on the current workspace.
- Also unhiding is done (only) on the current workspace, so in short, the process of hiding and unhiding is doen completely independent per workspace.
The script
#!/usr/bin/env python3
import subprocess
import os
import time
datadir = os.environ["HOME"]+"/.config/maptoggle"
if not os.path.exists(datadir):
os.makedirs(datadir)
workspace_data = datadir+"/wspacedata_"
def get_wlist(res):
res = get_res()
try:
wlist = [l.split() for l in subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").splitlines()]
return [w for w in wlist if all([
0 < int(w[2]) < res[0],
0 < int(w[3]) < res[1],
"_NET_WM_WINDOW_TYPE_NORMAL" in subprocess.check_output(["xprop", "-id", w[0]]).decode("utf-8"),
])]
except subprocess.CalledProcessError:
pass
def get_res():
# get resolution
xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
pos = xr.index("current")
return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]
def current(res):
# get the current viewport
vp_data = subprocess.check_output(
["wmctrl", "-d"]
).decode("utf-8").split()
dt = [int(n) for n in vp_data[3].split("x")]
cols = int(dt[0]/res[0])
curr_vpdata = [int(n) for n in vp_data[5].split(",")]
curr_col = int(curr_vpdata[0]/res[0])+1
curr_row = int(curr_vpdata[1]/res[1])
return str(curr_col+curr_row*cols)
res = get_res()
try:
f = workspace_data+current(res)
wlist = eval(open(f).read().strip())
for w in wlist:
subprocess.Popen(["xdotool", "windowmap", w[0]])
os.remove(f)
except FileNotFoundError:
current_windows = get_wlist(res)
open(f, "wt").write(str(current_windows))
for w in current_windows:
subprocess.Popen(["xdotool", "windowunmap", w[0]])
How to use
The script needs both
wmctrl
andxdotool
:sudo apt-get install wmctrl xdotool
- Copy the script into an empty file, save it as
toggle_visibility.py
Test- run the script: in a terminal window, run the command:
python3 /path/to/toggle_visibility.py
Now open a new terminal window (since the first one seemingly disappeared from the face of the earth) and run the same command again. All windows should re-appear.
NB: make sure you do not have "valuable" windows open while testing
If all works fine, add the command to a shortcut key combination: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:
python3 /path/to/toggle_visibility.py
Explanation
As said, the script uses xdotool
's windowunmap
, to (completely) hide windows and the applications they belong to. The script:
- reads what is the current workspace
- reads the windows, which exist on the current workspace (only)
- writes the window list to a file, named after the current workspace
- hides the windows
On the next run, the script:
- checks if the file, corresponding to the current workspace exists
- if so, reads the window list and un- hides the windows.
thus toggling visibility of windows and applications on the current workspace.

- 83,767
-
Great. Now only if i can find a way to automatically execute the script when I move to the other workspace so they just magically disappear and then appear again when i move back. Maybe i could write a python script to replace the shortcut key for
ctrl
+shift
+arrow key
– thuyein Jan 26 '16 at 02:52 -
1
Unfortunately it's impossible.
Unity always shows all applications from everywhere and there are no way to change this. There is a bug report - https://bugs.launchpad.net/ayatana-design/+bug/683170 But seems developers aren't going to do anything. Probably if you mark at the top of the page that this bug affects you it will help developers to understand importance of such option.

- 167
- 1
- 3
- 8
-
1Don't comment on the bug report, just mark it as affecting you at the top of the page. – Flimm Sep 18 '13 at 14:22
-
@Flimm do you happen to know what desktop manager has this funcionality? – Cesar Sep 13 '14 at 03:25
-
2unity looks great but the lack of customizability is really frustrating. – Programster Aug 26 '15 at 09:22
Hide app/window from alt-tab switcher
- install dconf-editor using following command
sudo apt-get install dconf-editor
- launch dconf-editor from menu or terminal using following command
dconf-editor
- in dconf visit the location
- for app-swicther use following
/org/gnome/shell/app-switcher/current-workspace-only
- for window-swithcer use following
/org/gnome/shell/window-switcher/current-workspace-only
- note: you can also edit both
- for app-swicther use following
- turn off button/switch that says Use default value
- override the Custom value from
false
totrue
- save changes by clicking on Apply button at bottom right of dconf

- 121
- 4
gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
instead of installingdconf-editor
. – sotmot Apr 06 '21 at 16:02