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

Status: New Owner: ---- New issue 523 by kag...@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

Comment #1 on issue 523 by kag...@genshiken.org: Too small remembered pids hooks in XMonad.Actions.SpawnOn http://code.google.com/p/xmonad/issues/detail?id=523 Component-Contrib

Updates: Status: Fixed Owner: vogt.a...@gmail.com Labels: Component-Contrib Type-Defect Comment #2 on issue 523 by vogt.a...@gmail.com: Too small remembered pids hooks in XMonad.Actions.SpawnOn http://code.google.com/p/xmonad/issues/detail?id=523 I've pushed patch adding a slightly incorrectly named: manageSpawnWithGC :: ([(ProcessID, ManageHook)] -> X [(ProcessID, ManageHook)]) -> ManageHook Some options for the first argument are: f1 = return -- never delete anything old f2 = return . take 100 -- keep 100 f3 xs = do -- keep roughly the number of processes you have ps <- readProcess "ps" ["u"] "" return (take (length (lines ps)) xs)

Comment #3 on issue 523 by kag...@genshiken.org: Too small remembered pids hooks in XMonad.Actions.SpawnOn http://code.google.com/p/xmonad/issues/detail?id=523 That fixed the issue. Thanks.
participants (1)
-
codesite-noreply@google.com