Ubuntu – How to make Ubuntu 18.04 (GNOME) workspace prohibit alt-tab to windows on other workspaces


I am using Ubuntu 18.04 running GNOME desktop environment

I have two workspaces, one and two, with following windows

  • Work space 1: shell 1, chrome 1
  • Work space 2: shell 2, chrome 2

I want: when I'm in a particular workspace, I can only alt-tab to windows that were opened in that workspace (other windows that were not opened in that workspace should not show up).

I'm aware of some of these related questions:

  1. this one seems like what I am asking here, but the answer was for Unity, not GNOME
  2. The question + answer only make it so that the dock doesn't show windows from other workspaces, I can still alt-tab with it

Best Answer

To ensure that the default task switcher of Gnome Shell (Ubuntu 17.10 and higher) only shows applications of the current workspace, change a setting using the following command:

gsettings set org.gnome.shell.app-switcher current-workspace-only true

You can also change this setting with dconf-editor, a graphical tool that allows inspecting and changing a range of settings of any application that uses the gsettings framework.

To reset to the default setting:

gsettings reset org.gnome.shell.app-switcher current-workspace-only