ManageHook question regarding sending applications to certain workspaces.

Hi XMonad users and hackers, since I have been using XMonad I have been using a manage hook to send epdfviewer (my pdf reader of choice) to a workspace "3:doc" using the usual: [ className =? "Epdfview" --> doShift "3:doc"] I would also like this workspace to be moved onto the second screen of my two screen xinerama setup. After looking through the config archive the closest I can find to this is: doShiftAndGo = doF . liftM2 (.) W.greedyView W.shift which brings the workspace the application is moved to, to the current screen. Is there a way to always bring the workspace to screen 2? Regards, Mike

Mike Sampson
doShiftAndGo = doF . liftM2 (.) W.greedyView W.shift
which brings the workspace the application is moved to, to the current screen. Is there a way to always bring the workspace to screen 2?
A complete (untested) hack: ,---- | import XMonad.Actions.CycleWS | | doShiftAndGoOther w = do nextScreen | doShiftAndGo w | prevScreen `---- It might be possible to do this without CycleWS, but I'm not sure how (without looking at CycleWS's code). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi,
On Sun, Apr 11, 2010 at 5:25 PM, Ivan Lazar Miljenovic
Mike Sampson
writes: doShiftAndGo = doF . liftM2 (.) W.greedyView W.shift
which brings the workspace the application is moved to, to the current screen. Is there a way to always bring the workspace to screen 2?
A complete (untested) hack:
,---- | import XMonad.Actions.CycleWS | | doShiftAndGoOther w = do nextScreen | doShiftAndGo w | prevScreen `----
It might be possible to do this without CycleWS, but I'm not sure how (without looking at CycleWS's code). [...]
Thanks Ivan. I can see why you called it a hack but lacking anything better it will do. I will have a look at CycleWS for some ideas. Mike

Excerpts from Mike Sampson's message of Sun Apr 11 01:06:00 -0600 2010:
since I have been using XMonad I have been using a manage hook to send epdfviewer (my pdf reader of choice) to a workspace "3:doc" using the usual:
[ className =? "Epdfview" --> doShift "3:doc"]
I would also like this workspace to be moved onto the second screen of my two screen xinerama setup. After looking through the config archive the closest I can find to this is:
doShiftAndGo = doF . liftM2 (.) W.greedyView W.shift
which brings the workspace the application is moved to, to the current screen. Is there a way to always bring the workspace to screen 2?
I think what you're wanting is Actions.OnScreen rather than CycleWS. -- import OnScreen module -- screens are zero indexed so 1 is second one: doIt = doF . liftM2 (.) (viewOnScreen 1) W.shift This module has changed a few times and (I think) is only in darcs xmonad-contrib. I believe the ff. documentation is up to date: http://n-sch.de/hdocs/xmonad-contrib/XMonad-Actions-OnScreen.html -- wmw

On Tue, Apr 13, 2010 at 10:30 AM, Wirt Wolff
Excerpts from Mike Sampson's message of Sun Apr 11 01:06:00 -0600 2010:
[...]
I think what you're wanting is Actions.OnScreen rather than CycleWS.
-- import OnScreen module -- screens are zero indexed so 1 is second one:
doIt = doF . liftM2 (.) (viewOnScreen 1) W.shift
This module has changed a few times and (I think) is only in darcs xmonad-contrib. I believe the ff. documentation is up to date:
http://n-sch.de/hdocs/xmonad-contrib/XMonad-Actions-OnScreen.html [...]
That looks perfect. I'm using a current darcs version so I will check that out. Thanks Wirt.
participants (3)
-
Ivan Lazar Miljenovic
-
Mike Sampson
-
Wirt Wolff