384

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?

7
  • 55
    Thanks for the Alt + `. I've been google for this for a while now.
    – Kugel
    Oct 30, 2012 at 22:48
  • @Hitsugaya198, I agree that installing that Shell extension is currently the best path. Jun 19, 2017 at 11:21
  • @Kugel or anyone really - how to press this combo on non-US keyboards where ` requires shift?
    – Nearoo
    Oct 15, 2018 at 9:24
  • @Nearoo, IIRC it shouldn't matter what keyboard configuration you have, you should press whatever you have above "Tab" instead of "`". Oct 16, 2018 at 12:10
  • 2
    The correct answer changed in 2019 - today, the answer from @Obnebion is the correct one: Change your "switch applications" keyboard shortcut (Alt+Tab) to be the "switch windows" one. Mar 11, 2021 at 9:09

17 Answers 17

132

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.

10
  • 4
    This is the answer right now. It is buildin.
    – janw
    Mar 19, 2019 at 9:24
  • 1
    Right, since 2018, this is the way recommended by the AlternateTab extension author. Discussion on reddit Nov 24, 2019 at 2:45
  • 2
    Why is this not the accepted answer and more upvoted than just 9 votes as of 18/08/2020? Super easy to do and not as intimidating as the accepted answer to this question.
    – Maritim
    Aug 18, 2020 at 12:36
  • 4
    @Maritim, I've just switched it to the "accepted answer". It wasn't so until now because I asked the question almost a decade ago and got a satisfying answer years before this one was a possibility. I don't even use GNOME anymore, so I don't bother checking for new solutions, but thankfully another user managed to notify me to make the switch and keep this popular thread updated. Mar 12, 2021 at 6:43
  • 1
    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, 2021 at 12:44
397
  • 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.

15
  • 34
    I'm surprised that people are so readily installing third-party application switchers in favour of reconfiguring Gnome in place. This to me is a much more desirable solution than most others presented.
    – mirichan
    Aug 11, 2015 at 0:50
  • 12
    To have the switch-windows work across workspaces, uncheck org.gnome.shell.window-switcher.current-workspace-only using dconf-editor. Apr 18, 2017 at 7:02
  • 2
    On Ubuntu 17.10 I had to apt install dconf-editor first, not sure if it's included in other distros. Oct 26, 2017 at 20:01
  • 3
    It worked on Ubuntu 18.04!
    – qmn1711
    Jun 14, 2018 at 13:05
  • 9
    I just did that config change via the normal Gnome Settings App, under Keyboard. Find "Switch Windows", assign it "Alt+Tab" and then "Switch Apps" is automatically unassigned. No need to edit config files! Nov 15, 2018 at 11:37
140

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'.

8
  • 6
    Thank you very much for your tip, it really works! Now if I could just figure out how to get rid of that thick black frame around the selected window and have it display that "selection box" Alt+Tab gives I'll be in heaven. :) Sep 30, 2012 at 11:31
  • 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. Nov 22, 2014 at 4: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, 2015 at 7:01
  • 7
    Doesn't work in Ubuntu 16 Nov 6, 2016 at 3:16
  • 7
    @Waldir Leoncio. Set Alt+Tab to "Switch windows" instead of "Switch windows directly" and the thick frame should disappear. Gnome 3.26 Jan 25, 2018 at 12:34
53

Little help -

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

0
25

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/

4
  • 6
    +1 best answer here. Works flawlessly in Ubuntu 17.10. Thanks! Searcher for "AlternateTab" in "Acitivites" and it pops right up
    – birgersp
    Nov 6, 2017 at 8:25
  • It seems to be supported already without the need to install the extension. See post from the developer: blogs.gnome.org/fmuellner/2018/10/11/… Jun 21, 2019 at 14:57
  • This should be accepted answer. Totally hassle free.
    – Lokesh
    Feb 6, 2020 at 7:26
  • works in PoPOS also Oct 7, 2021 at 6:19
18

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

3
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.

2
  • You rock dude! Great answer Jan 3, 2019 at 16:18
  • 1
    Also works for Fedora 30
    – Jounathaen
    Jun 4, 2019 at 12:26
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!!!)

3
  • 3
    In bionic, $ dconf write /org/gnome/desktop/wm/keybindings/switch-applications-backward "[]" says error: 0-2:unable to infer type
    – nealmcb
    May 3, 2018 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 "['<Alt>Tab']" and gsettings set org.gnome.desktop.wm.keybindings cycle-windows-backward "['<Shift><Alt>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 3, 2018 at 19:23
  • @nealmcb I have changed by running dconf gui application and set to not use default but []
    – rofrol
    Dec 19, 2018 at 12:22
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

2
  • 1
    +1 and this should be the 'correct' answer, as it directly resolves the issue as was asked. I suspect your distro has less to do with it, and more the fact that you are using Gnome desktop, as I just utilised your solution successfully on Ubuntu 17.04 with Gnome 3 desktop. Jun 19, 2017 at 10:11
  • 1
    This is the only solution that worked for me and its so simple.
    – Lokesh
    Jul 30, 2018 at 9:41
10

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"
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.

2
  • Hi wleoncio, the above post is telling about a different problem (compared with the question). I tried with your answer, but nothing happened May 30, 2012 at 7: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. Mar 12, 2019 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

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

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.

1
  • You need to handle the backward cases as well: switch-applications-backward and switch-windows-backward. Nov 24, 2019 at 2:48
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.

0

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.

0

The following works on CentOS Linux release 7.9.2009

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

Screenshot for clarity

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.