246

I am looking for a clean and fast method to force GNOME in Ubuntu 14.04 to switch between active apps only on the current workspace when pressing the shortcut alt + tab.

pomsky
  • 68,507
daniel451
  • 7,403
  • 8
  • 23
  • 25

7 Answers7

320

Simply:

gsettings set org.gnome.shell.app-switcher current-workspace-only true
pomsky
  • 68,507
austinmarton
  • 3,315
209

Here is the solution I came up with:

Very fast & easy, without any installations/extensions:

  1. Install dconf-editor (already installed on current debian/ubuntu distributions):

    sudo apt-get install dconf-editor
    
  2. Open dconf-editor (from the Dash or a Terminal)

  3. Navigate to: org -> gnome -> shell -> app-switcher
  4. Set "current-workspace-only" to true

    screenshot

..and you're done :)

pomsky
  • 68,507
daniel451
  • 7,403
  • 8
  • 23
  • 25
26

Seems to be fixed with

gsettings set org.gnome.shell.window-switcher current-workspace-only true
gsettings set org.gnome.shell.app-switcher current-workspace-only true
N0rbert
  • 99,918
  • 1
    Looks like I need only the first one (.window-switcher) – kerner1000 Jan 05 '18 at 17:52
  • This did the job. It only shows the apps currently in the workspace and, when an app has two instance each in a different workspace when pressing Alt+Tab it prevents from showing both of them. But you have to use both the commands in this answer. Awesome, thank you! – juliangonzalez Oct 01 '18 at 15:38
  • Debian Buster : the first line did it for me. – RichieHH Jan 08 '20 at 13:39
22

As an alternative to installing dconf-editor and having to fiddle around with your mouse so much, you can also do this from terminal.

To create the current-workspace-only value:

dconf write /org/gnome/shell/app-switcher/current-workspace-only 'true'

To erase it, going back to default settings:

dconf reset /org/gnome/shell/app-switcher/current-workspace-only

I would like dconf-editor more if it could search through paths, properties, and values.

muru
  • 197,895
  • 55
  • 485
  • 740
matty
  • 321
  • 3
    the (later) answer using gsettings is just a higher-level api that also sets the dconf values (and would probably be in general preferred over directly accessing dconf) – michael Jan 01 '18 at 07:56
  • 1
    This solution work still on Ubuntu 21.10. Perfect. – KFO Dec 07 '21 at 07:37
  • For keys that don't exist yet, dconf does not let you auto complete them, while gsettings does. f.e. dconf write /org/gnome/shell/app-sw then pressing tab does not complete to anything, but gsettings set org.gnome.shell.app-sw then pressing tab completes to gsettings set org.gnome.shell.app-switcher – trusktr Jun 21 '22 at 23:34
14

An alternative for people who want to tab through open windows on current workspace but also want to be able to tab through all open apps (on any workspace) this can be achieved by changing the keyboard shortcuts.

Under Settings > Devices > Keyboard (on Ubuntu 17.10):

  • Switch Windows: Alt+Tab
  • Switch Applications: Super+Tab
pomsky
  • 68,507
Clauds
  • 291
  • That's tricky - Alt+Tab changes windows, even when changing the keyboard shortcuts. Is there a way to fix that? – Rick-777 Nov 29 '17 at 14:49
  • Yes, Alt+Tab will show the windows open on the current workspace whereas Super+Tab will show all open programs (on any workspace). What do you want to achieve, that Alt+Tab shows open programs on the current workspace instead of open windows? – Clauds Nov 30 '17 at 10:19
  • 1
    Hi ! I'm trying to set this specific behavior, but I don't seem to be able to. Both commands always behave the same. I tried gsettings current-workspace-only for window and app switcher with no luck either. Any idea? Thanks :) – Biggybi Apr 15 '18 at 06:16
  • I checked my gsettings and I have org.gnome.shell.app-switcher current-workspace-only false and org.gnome.shell.window-switcher current-workspace-only true – Clauds Apr 15 '18 at 09:59
  • This does not answer the question but is a great tip nonetheless. – crafter Aug 07 '18 at 22:32
  • This is great, thanks! Just did this in Ubuntu 18.04 and it's really helpful. It seems I didn't have Alt+Tab bound to anything originally (but it still performed the 'switch applications' action). After binding Alt+Tab to 'switch windows', I had to re-bind Super+Tab to 'switch applications' for some reason. – Daniel Buckmaster Jul 03 '19 at 00:39
8

AlternateTab

If you also want to ungroup applications on switcher you can add the officially supported AlternateTab extension.

screenshot

Moreover:

Actually, Ubuntu is going to have the Alternatetab as default on Alt+tab in the upcoming version of Ubuntu (19.04), while the current default app switcher will remain on Super+tab.

Pablo Bianchi
  • 15,657
2

The other solutions here did not work for me on Ubuntu 18.04.1, but the Alt Tab Workspace extension worked.

k_g
  • 163