6

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

I'm using ArchLinux.

  • 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
0

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

  • 1
    Yes, it only filters by workspace. Both monitors is on the same workspace in Gnome 3. – pipe May 28 '16 at 8: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. – jschlichtholz May 28 '16 at 8:30
  • None of these solutions is working for me :/ – Willemoes Nov 3 '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.

  • this actually broke my alt tab, so that nothing happens on alt+tab. Nothing that an alt+f2 r wouldn't fix though – Rombus Feb 15 at 13:02

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.