426

I love pretty much everything about how Gnome Shell handles app-switching through Alt+Tab. My one gripe with it, though, is how it forces the user to use Alt+` (or Alt+ whatever key above the Tab key for non-US keyboard layouts) to switch between windows of the same app. This is very annoying for me, because now I have to keep in mind if the last window I was using belonged to the same app as the current window or not. Definitely a nuisance for power users who thinks in terms of "windows I'm working with" instead of "applications I'm working on".

I've tried the AlternateTab extension, but it's looks way too ugly for me. Not to mention that in the end all I want is to remap Alt+(key above tab) to Alt+Tab on this application. I guess one option would be to just tweak Gnome-shell. My guess is that I should tinker with the altTab.js file at /usr/share/gnome-shell/js/ui/, but the file is too long and overwhelming for someone like me, who doesn't know JavaScript.

Does anyone know how I can make Gnome Shell stop grouping windows by applications?

Waldir Leoncio
  • 5,008
  • 3
  • 20
  • 23
  • 2023 TLDR: Configure your shortcuts under _(Settings App)_ > _Keyboard_ > _View and customize Shortcuts_ > _Navigation_, and here _Switch windows_ or _Switch windows directly_. – Nils Lindemann Apr 02 '23 at 13:34

18 Answers18

407
  • Open dconf-editor
  • Go to org/gnome/desktop/wm/keybindings
  • Move the value '<Alt>Tab' from switch-applications to switch-windows
  • Optionally move '<Shift><Alt>Tab' from switch-applications-backward to switch-windows-backward
  • If you want switch-windows to work across desktops, not just in the current desktop, you can also uncheck org/gnome/shell/window-switcher/current-workspace-only (Courtesy of @CharlBotha)
  • Close dconf-editor
  • If using X11, press <Alt>F2, then type r to restart Gnome.

The last step does not always appear to be necessary, but it should not hurt (especially since it does not close any of your running applications). It will not work, and is not necessary for Wayland.

Mad Physicist
  • 4,320
  • 2
  • 15
  • 15
  • 1
    Had a special case where pestophagous' answer didn't help, but yours did. In my case, `switch-applications` had both `'Tab'` *and* `'Tab'` assigned to it, while `switch-windows` had just assigned `'Tab'` to it. Obviously the setting for `switch-applications` "won" and thus I couldn't switch windows anymore. The Gnome control center dialog did not display the mapping correctly but `dconf-editor` did. I migrated from Ubuntu's gnome-flashback to Gnome 3. Maybe that caused the artifact. – dasup Feb 28 '17 at 21:16
  • 12
    To have the `switch-windows` work across workspaces, uncheck `org.gnome.shell.window-switcher.current-workspace-only` using `dconf-editor`. – Charl Botha Apr 18 '17 at 07:02
  • 2
    On Ubuntu 17.10 I had to `apt install dconf-editor` first, not sure if it's included in other distros. – Kim Gräsman Oct 26 '17 at 20:01
  • 1
    Just an addendum, Alt+F2 -> r doesn't work in Wayland. – ptkato Apr 13 '19 at 17:28
  • 3
    For extra laziness https://superuser.com/a/1517491/384307 – Hendry Feb 06 '20 at 10:31
  • `dconf-editor` has not been installed by default in Ubuntu for at least half a decade. You can probably still get it, but you might as well just use the `dconf` or `gsettings` CLI utils as well. This is how to disable the current workspace setting for instance; `gsettings set org.gnome.shell.window-switcher current-workspace-only false` – oligofren Feb 23 '22 at 12:35
210

For anyone who is using Ubuntu 18 (to give you the same behavior as e.g. on Windows10):

  • go to settings > devices > keyboard
  • look for the keyboard shortcut for "Switch windows"
  • set this to the shortcut Alt+Tab (this will overwrite the old shortcut)

If you now press Alt+Tab you will be able to directly select all open windows without grouping into the different apps.

Update: In Ubuntu 22.04.02 LTS, this is already the default behaviour.

Laurin Herbsthofer
  • 2,234
  • 1
  • 7
  • 5
  • 1
    Right, since 2018, this is the [way recommended by the AlternateTab extension author](https://blogs.gnome.org/fmuellner/2018/10/11/the-future-of-alternatetab-and-why-you-need-not-worry/). [Discussion on reddit](https://www.reddit.com/r/gnome/comments/9nhmce/you_dont_need_alternatetab_extension/) – Robin A. Meade Nov 24 '19 at 02:45
  • 3
    Switch windows only works on the current workspace. I still wonder why you cannot just switch windows across workspaces.. this is driving me nuts. – Damocles Mar 30 '21 at 12:44
  • @Damocles I think that is intended behaviour though. At least for me it makes sense that different workspaces are not just "different screens", but somehow "different computers", i.e. different workspaces. I almost never use workspaces, and you may use them differently, but when I do use them I have one for work and one for personal things. I therefore actually prefer having them separated and have Alt+Tab not show windows from both. – Laurin Herbsthofer Apr 01 '21 at 10:42
  • 2
    @Damocles Check the most upvoted answer below for a way to achieve that. You need to uncheck the `/org/gnome/shell/window-switcher/current-workspace-only` setting. This is one way: `gsettings set org.gnome.shell.window-switcher current-workspace-only false` – oligofren Feb 23 '22 at 12:34
  • Needed to re-enable switch applications (for a less crowded experience), and this still helped. – Mehdi Haghgoo Apr 27 '23 at 21:16
  • In 2023, Gnome 44.1, you'll want to: * Open Settings * Click Keyboard in the left Panel (scroll down to it) * In the right panel under 'Keyboard Shortcuts' click 'View and Customise Shortcuts' * In the new popup select 'Navigation' * Scroll down to find 'Switch Windows' which you can set to 'Alt-tab'. – Ryan Jun 06 '23 at 03:48
144

From the comment by 'xaeth' on this Ergo Project blog post, I have learned that Alt+Esc will cycle through all windows without grouping by application. This was the simplest solution for me, and I'm glad it saved me from having to install other programs.

If testing with Alt+Esc turns out favorably for you, then you can go to System Settings > Keyboard > Shortcuts > Navigation and reassign Alt+Tab to perform the navigation task that was previously assigned to Alt+Esc. In my settings this task is named 'Switch windows directly'.

pestophagous
  • 1,549
  • 1
  • 10
  • 5
  • 4
    It doesn't give the same behavior. The expected behavior is to quick jump to the needed window. This is kind of a scroll jump, meaning you scroll over each windows, need to visually process each view until you stop at the desired one. – AlikElzin-kilaka Nov 22 '14 at 04:53
  • 3
    Does not unstack the windows for me, nor allow me to cycle through windows. It still cycles through applications. Maybe I should login again? Weird. – Lodewijk Feb 16 '15 at 07:01
  • 7
    **Doesn't work in Ubuntu 16** – Anand Rockzz Nov 06 '16 at 03:16
  • 7
    @Waldir Leoncio. Set Alt+Tab to "Switch windows" instead of "Switch windows directly" and the thick frame should disappear. Gnome 3.26 – bartolo-otrit Jan 25 '18 at 12:34
  • This solution doesn't show the panel displaying all open windows, most voted solution does. – Puck May 17 '18 at 06:28
  • Alt+Esc only does open windows. Same on Windows. – Cees Timmerman Feb 27 '20 at 12:37
56

Little help -

Alt+Tab and then when you have grouped windows Alt+` helps a bit.

Raystafarian
  • 21,583
  • 11
  • 60
  • 89
rtdp
  • 661
  • 4
  • 4
26

AlternateTab

Substitute Alt-Tab with a window based switcher that does not group by application. This extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME Bugzilla instead.

https://extensions.gnome.org/extension/15/alternatetab/

Walialu
  • 381
  • 3
  • 6
18

The Windows Alt Tab extension by tglman is very useful. You can also fork it on GitHub.

evan.bovie
  • 3,202
  • 20
  • 30
Takida
  • 181
  • 1
  • 2
  • 1
    No need an extension, see this comment https://superuser.com/a/860001/914650. It worked on my Ubuntu 18.04 – qmn1711 Jun 14 '18 at 13:10
15

Don't know if it works like this for all OSes, but for Ubuntu 18.04 go to: Settings → Devices → Key

Then look for Switch windows which in my case is disabled and set it to Alt + Tab.

This switches between all windows and displays the horizontal selection box if we hold the Alt key down after tabbing.


There are other interesting entries there, namely Switch applications and Switch windows of an application which I have set for Super+Tab and Alt+Super+Tab respectively.

Daniel
  • 603
  • 8
  • 20
13

Using fedora 23 you can do the following

Install alternate-tab (was already installed for me)

sudo dnf install gnome-shell-extension-alternate-tab

Run pref editor

gnome-shell-extension-prefs

Then enable it

enter image description here

DONE, alt tab is no longer lame. Also its not some hack like the above with changing the keyboard short cuts. Alt-tab will still show the popup with thumbnails etc, just not grouped.

EDIT:

As Ubuntu has now switched back to Gnome I found myself trying to fix this issue again. It's even simpler if you have the gnome web plugin, just visit the alternate-tab plugin and click enable and it will be instantly fixed.

alternate tab

alternate tab

dogmatic69
  • 242
  • 2
  • 9
13

You can use the terminal to edit the preferences for the default switcher (This is a command-line equivalent of Mad Physicist's dconf-editor answer.)

run:

dconf write /org/gnome/desktop/wm/keybindings/switch-windows "['<Alt>Tab']"
dconf write /org/gnome/desktop/wm/keybindings/switch-windows-backward "['<Shift><Alt>Tab', '<Alt>Above_Tab']"
dconf write /org/gnome/desktop/wm/keybindings/switch-applications "[]"
dconf write /org/gnome/desktop/wm/keybindings/switch-applications-backward "[]"

or:

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<alt>Tab']"
etc...

(As a regular user - not root!!!)

Jonathan Hartley
  • 1,006
  • 13
  • 25
Yogev Neumann
  • 260
  • 1
  • 3
  • 9
  • 3
    In bionic, `$ dconf write /org/gnome/desktop/wm/keybindings/switch-applications-backward "[]"` says `error: 0-2:unable to infer type` – nealmcb May 03 '18 at 19:08
  • Thanks! My alternative to the currently-accepted "cycling-in-place" answer by @pestophagous via the command line is `gsettings set org.gnome.desktop.wm.keybindings cycle-windows "['Tab']"` and `gsettings set org.gnome.desktop.wm.keybindings cycle-windows-backward "['Tab']"` That allows me to see the windows in context at full resolution, so I can see if e.g. a browser page has the tab I'm looking for. – nealmcb May 03 '18 at 19:23
  • @nealmcb I have changed by running dconf gui application and set to not use default but `[]` – rofrol Dec 19 '18 at 12:22
12

Script for executing on the command line (based on Mad Physicist's awesome answer):

gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Shift><Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"
gsettings set org.gnome.shell.window-switcher current-workspace-only "false"
Duco
  • 221
  • 3
  • 5
1

You don't need to download anything, nor even use a gui if you do:

gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"

Obviously, you can leave the keybinding for switch-applications blank ("[]") if you never want to use it.

This works on Ubuntu 18.04.

borizzzzz
  • 111
  • 5
1

It's just a matter of readjusting the gnome default shortcuts.

# run as regular user
dconf load / <<EOF
[org/gnome/desktop/wm/keybindings]
switch-applications=['<Super>Tab']
switch-applications-backward=['<Shift><Super>Tab']
switch-windows=['<Alt>Tab']
switch-windows-backward=['<Shift><Alt>Tab']
EOF

This will use Alt-Tab to change to the next window while still keeping Super-Tab iterate through applications.

Javier
  • 11
  • 1
1

The following works on CentOS Linux release 7.9.2009

Settings --> Devices --> Keyboard --> Navigation --> Switch windows

Screenshot for clarity

MMM
  • 2,652
  • 5
  • 25
  • 43
AP22
  • 111
  • 1
1

This to line worked for me. (Nobara 37)

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Super>Tab', '<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Super>Tab', '<Shift><Alt>Tab']"
Waldir Leoncio
  • 5,008
  • 3
  • 20
  • 23
Lacoudasse
  • 11
  • 1
1

This post has shed some light on the subject. By accessing apps -> metacity -> global_keybindings on gconf-editor there's a key called switch_group, which is mapped to <Alt>Above_Tab. Changing that to <Alt>Tab should solve the issue.

Waldir Leoncio
  • 5,008
  • 3
  • 20
  • 23
  • Hi wleoncio, the above post is telling about a different problem (compared with the question). I tried with your answer, but nothing happened – Hoàng Long May 30 '12 at 07:39
  • @HoàngLong, Metacity was a popular GTK2 window manager. Modern OSs have moved on to GTK3 several years ago, so my 6-year old solution is likely not working for up-to-date systems. – Waldir Leoncio Mar 12 '19 at 17:22
1

You can use the a different application switcher - can enabled using compizconfig-settings-manager.

See good info on CompizConfig in Ubuntu. It can also be installed on openSUSE and probably other distributions.

Result example: enter image description here

AlikElzin-kilaka
  • 1,939
  • 2
  • 18
  • 33
0

The way I was able to do it was install the dconf editor from the Ubuntu Software Store. From there, you can follow the path -> /org.gnome/desktop/wm/keybindings. Path View

If you scroll down, you will see switch-applications which I change to ['Tab'] and right below it is switch-application-backwards which is now ['Tab'].

Switch Applications

Scrolling down, you will see switch-windows and switch-windows-backwards. You can set this to ['Tab'] and ['Tab'] respectively.

Switch Windows Settings

Just figured Id share. New to Ubuntu and this took me about an hour of googling to figure out. This definitely works.

0

In Gnome Shell on Gnome 3.34.3 in Ubuntu 19.10 x86_64, Settings, Devices, Keyboard Shortcuts, Navigation, Switch windows "Alt+Tab" doesn't group, but also doesn't include minimized windows like the Coverflow Alt-Tab extension does, which also overrides the normal grouped Switch applications "Super+Tab" for no reason.

Cees Timmerman
  • 1,667
  • 2
  • 20
  • 46