Score:1

How to configure Alt-Tab to switch between applications without bringing all windows to foreground?

sy flag
jth

In Pop!_OS, Alt-Tab is used to switch between windows of different applications. In Ubuntu 20.04, with "Switch applications" set to "Alt+Tab" in the Keyboard Shortcuts settings, Alt-Tab switches between the entire set of windows for each application, meaning that switching to the next application brings all of that application's windows to the foreground.

To illustrate the difference, here is a demo of the Alt-Tab behavior in Pop!_OS (Alt-Tab switches between Firefox and a single terminal window):

https://imgur.com/a/C1Cwxdn

And here is a demo of the Alt-Tab behavior in Ubuntu 20.04 (Alt-Tab brings all terminal windows to the foreground):

https://imgur.com/a/c9m7KvI

Finally, here are my current keyboard shortcuts in Ubuntu:

https://imgur.com/a/z5Q3UXu

I would like to know if it is possible to configure Ubuntu 20.04's Alt-Tab shortcut to operate like in Pop!_OS, so that it switches between windows of different applications, without bringing the entire set of windows of a given application to the foreground.

Score:1
cn flag

The application switcher in Gnome indeed is designed to switch all windows of an application. There appears not to be an easy option to change the behavior to raise only the last active window of the application, except for coding, which the developpers of Pop!_OS apparently did.

Currently, this situation can be coped in one of the following ways:

Switch to the window switcher— Move to the Window switcher instead of the Application switcher. In "Settings", "Keyboard", "Customize shortcuts", look in the "Navigation" section and set "Switch Windows" to Alt+Tab, rather than "Switch Applications".

The application switcher is designed to manage windows per application. It thus brings all windows related to the application to the foreground. While application switching with Super+Tab, you still can select a specific window of e.g. the terminal only using Alt+`.

Alt+`— Allegedly, this is very inconvenient if you need to switch back and forth between one window and a specific terminal window. Then, however, Alt+Esc has you covered. It will switch between the two last windows. If you hold Alt, it will switch between the open windows without any popup.

Move to another workspace— An alternative way to cover this workflow is to move any other terminal window to a different workspace. However, there is no easy way to quickly "dismiss" a window to the next workspace: the dedicated shortcut key (Shift+Super+PgDn/PgUp or Shift+Ctrlkbd>+Alt+Left/Right) moves you along with the window to the new workspace.

Hide— A third way to cover this workspace is to hide the other terminal windows. In Ubuntu, the shortcut Super+H hides the window. Leave only the terminal window you currently need visible, and you can Super+Tab between that single window and a window of another application.

jth avatar
sy flag
jth
I should have been more clear that what I want is still to group windows by application, but to be able to switch between windows of different applications without bringing *all* of the windows for the current application to the foreground. But I've decided it's not a huge deal, I can live with this behavior.
vanadium avatar
cn flag
I see, but that would probably defeat the concept of the application switcher, which aims to move to windows of a different application. I did not find any "hacky" way to change that behavior (e.g. extension, or editing some code), so it likely is not obvious if you are not developer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.