18

How can I tweak Alt+Tab in Gnome 3 so it will iterate windows only in the current monitor?

I'm using ArchLinux.

pipe
  • 921
  • 10
  • 25
willir
  • 281
  • 2
  • 5
  • I would like to know the same thing. I'm using debian (stretch/testing), but I doubt that the distribution has much to do with it. – pipe May 26 '16 at 14:08
  • 1
    Check this one https://extensions.gnome.org/extension/1437 Credit to @Vasiliy Bolgar – undefined Nov 27 '20 at 11:35
  • KDE plasma has this option in the settings. And a few others (same screen(monitor)/desktop/activity (I don't exactly know what these are for), minimised only, and visible only). – ctrl-alt-delor Nov 27 '20 at 17:08

5 Answers5

4

Faced the same issue when bought second monitor. Did this repo with the workaround - https://github.com/reanimatorzon/at4dm

At this time I'm trying to publish this to https://extensions.gnome.org/extension/3148/alt-tab-for-dual-monitor/, but it is on review yet.

1

If you are not fixed on using gnome, then:

KDE plasma has this option in the settings. And a few others (same screen(monitor)/desktop/activity (I don't exactly know what these are for), minimised only, and visible only).

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
0

Have you seen this extension, it says "A replacement for Alt-Tab, cycles through apps on current workspace only."

bmcculley
  • 101
  • 2
  • 2
    Yes, it only filters by workspace. Both monitors is on the same workspace in Gnome 3. – pipe May 28 '16 at 08:28
  • 1
    I know, it's not what you are trying to achieve but just for future reference: `gsettings set org.gnome.shell.app-switcher current-workspace-only true` would achieve the same without having to add an extension. – jnodorp May 28 '16 at 08:30
  • None of these solutions is working for me :/ – Willemoes Nov 03 '17 at 13:02
0

I know this is quite late, but I actually found an answer for this!

Run this code after Gnome starts:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'imports.ui.altTab.WindowSwitcherPopup.prototype._getWindowList = function() {
let workspace = this._settings.get_boolean("current-workspace-only") ? global.screen.get_active_workspace() : null;
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
allWindows = allWindows.filter(w => w.get_monitor() === global.screen.get_current_monitor());
return allWindows;
}'

All credit goes to boisdeb on Reddit, which made the js code that actually makes this work. It'd be nice if someone actually developed the code into an extension, but for now I can't complain: it works a treat.

emi
  • 101
  • 1
0

You can use this extension to only switch between applications or windows on your current monitor. Current monitor here means whichever monitor your mouse cursor is on.

Travis
  • 101
  • 1