Switch windows only in current workspace and display
Solution 1:
I'm not sure about Unity or XFCE, but fully customizable desktop switching is one of the many reasons I choose to run KDE (Kubuntu).
In KDE to limit task switching to the current screen do the following:
Press Alt+F2 and type
task switcher
and then select Task Switcher from the drop-down list.Inside the
task switcher
control panel's main tab there is a section called Filter windows by.Select the check box for
Virtual Desktops
,Activities
, andScreens
, and select theCurrent activity
option for each.Press
Apply
, and verify things work as expected before closing.
Note: You can also find "Task Switcher" by doing the following:
-
click on the
Kick Off
menu-- Navigate to the
Computer
tab -
click on the
System Settings
menu-- Under the
Workspace Appearance and Behavior
section chooseWindow Behavior
Related: What is a activity in KDE and what can I do with it?
Solution 2:
Whether you're using compiz
, xfwm4
or any other WM, you can use a flexible desktop-independent task-switcher like Skippy-XD. As explained in this upstream thread, you can configure Skippy-XD (in ~/.config/skippy-xd/skippy-xd.rc
for a particular user, or in /etc/xdg/skippy-xd.rc
for all users) so as:
- To avoid displaying windows from other virtual desktops, set
[general] -> showAllDesktops
tofalse
. Should work on most EWMH compliant WMs. - To avoid displaying windows from other Xinerama screens, set
[xinerama] -> showAll
tofalse
. - To avoid displaying windows from other, separate X displays, set
[general] -> includeAllScreens
tofalse
. (But this is a hidden switch and is disabled by default.)
See Something like 'KDE Present Windows' / 'Compiz Scale' / 'Mac OS X exposé' in Openbox / LXDE / Xfce? for some usage and installation details. Basically you can install latest development packages from Skippy-XD PPA (daily). Then you can bind skippy-xd
command to Alt + Tab or Alt + Esc or whatever. When set up appropriately, as explained above, Skippy-XD should display only the windows from the current virtual desktop and monitor.
Solution 3:
To my knowledge Xfce 4.10
(and I assume that this is what you use) has only limited support for additional monitors.
In this respect 4.12
will support extended desktop mode for multiple monitors (see design/xfce4-settings/display for details), which hopefully would fix the issues that you're seeing. You can try out the development snapshots from the ppa:xubuntu-dev/xfce-4.12 PPA.
Or perhaps you simply need to follow the advice in this question: How do I setup dual monitors in XFCE?. Either way, currently there seems to be a limitation in xfwm4
(if this is what you're using), specifically that it cycles through all the windows on current workspace, whether you use one monitor or two. For details see upstream bug report.