Run program on second screen.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Run program on second screen.

Dontdie YCH
Hello all,

Anyone guide me how to spawn(or 'runOrRaise') program on second screen?

My xmonad.hs,

http://lpaste.net/118660

Thanks.

Reply | Threaded
Open this post in threaded view
|

Run program on second screen.

Brandon Allbery
On Sun, Jan 18, 2015 at 5:06 AM, Dontdie YCH <dontdieych at gmail.com> wrote:

> Anyone guide me how to spawn(or 'runOrRaise') program on second screen?
>

I left a message in IRC, but the answer is to use spawnOn with

http://xmonad.org/xmonad-docs/xmonad/XMonad-Operations.html#v:screenWorkspace

to map a screen id to the workspace currently visible on that screen.
Something like

    spawnOnScreen :: ScreenId -> String -> X ()
    spawnOnScreen s cmd = screenWorkspace s >>= flip spawnOn cmd

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20150118/51832a80/attachment.html>