normal (rather than greedy) view: disable screen-focus switching?

Dear all, Following the FAQ I have disabled greedy view, so that when I ask xmonad to show a workspace on a screen that is currently visible (on a different screen) the two workspaces don't get toggled. This works very well for me, but I would prefer if xmonad would NOT switch the focus to the other screen when I do so. Did this make any sense? What I mean is that if - the two screens are currently displaying workspaces 1 (on the left) and 2 (on the right) - I have the focus on the left-hand-side screen on my desk - I ask xmonad to take me to workspace 2 [which is already being shown on the other screen] I would like xmonad to do absolutely nothing. Using normal view as indicated in the FAQ, this behavior makes xmonad switch focus to the right-hand-side screen (where workspace 1 is being displayed). If there is a snippet of Haskell code I can use to do this, that would be amazing. Many thanks for any help! : ) ~l

Quoting Lara Michaels
Following the FAQ I have disabled greedy view, so that when I ask xmonad to show a workspace on a screen that is currently visible (on a different screen) the two workspaces don't get toggled. This works very well for me, but I would prefer if xmonad would NOT switch the focus to the other screen when I do so.
There may be a contrib module for this. I don't know. In any case, some untested code follows: isVisible w ws = any ((w ==) . tag . workspace) (visible ws) lazyView w ws = if isVisible w ws then ws else view w ws You can then use lazyView exactly as you would use view or greedyView (it should have the same type). Good luck, ~d
participants (2)
-
Lara Michaels
-
wagnerdm@seas.upenn.edu