[xmonad] Issue 523 in xmonad: Too small remembered pids hooks in XMonad.Actions.SpawnOn

codesite-noreply at google.com codesite-noreply at google.com
Sun Jan 13 18:34:49 CET 2013


Status: New
Owner: ----

New issue 523 by kag... at genshiken.org: Too small remembered pids hooks in  
XMonad.Actions.SpawnOn
http://code.google.com/p/xmonad/issues/detail?id=523

I use spawnOn in the startup hook because I want to run all needed programs  
at the their workspaces on window manager start. (I don't want to use  
manageHook because I may start using them on another workspaces.)
The hook looks like this:

startupHook' :: X ()
startupHook' = do
     args <- io getArgs
     -- Check for the first start
     unless ("--resume" `elem` args) $ do
         spawnOn "1" "firefox-bin"
         spawnOn "1" "deadbeef"
         spawnOn "2" "gajim"
         spawnOn "2" "thunderbird-bin"

It works great but as soon as I need more programs for startup it doesn't  
shift all of them to the right place because spawnOn remember only 5:

XMonad/Actions/SpawnOn.hs
maxPids :: Int
maxPids = 5

I tried to increase it to 20 and it keep working as supposed. So could you  
please apply it to upstream as well?
However "20" fails in this issue too: it could be too small for some  
people, so maybe it should be "100" or even we should simply strip out any  
restrictions on max number of remembered pid/hook pairs.
The only drawback that I can see in the last case: if window with  
remembered pid property will not appear, we will keep info about it in the  
state forever. But I don't think that it is a big problem.

Labels: Component-Contrib




More information about the xmonad mailing list