[xmonad] Issue 576 in xmonad: On FreeBSD Xmonad loses first hotkey sometimes

codesite-noreply at google.com codesite-noreply at google.com
Mon Aug 18 07:26:30 UTC 2014


Comment #9 on issue 576 by beyer... at gmail.com: On FreeBSD Xmonad loses  
first hotkey sometimes
http://code.google.com/p/xmonad/issues/detail?id=576

I'm also on FreeBSD, and while I haven't debugged the issue formally, I can  
say that they execute more reliably (haven't seen any issues since) when  
spawned inside tcsh.

First I tried something like the following:

I converted:

spawn "dmenu_run"

to

spawn "tcsh -c 'dmenu_run'"

Then, I decided to dig into the definition of spawn, and then I made an  
alternate version of spawn instead...

eg like the following:

-- | spawn. Launch an external application. Specifically, it double-forks  
and
-- runs the 'String' you pass as a command to \/bin\/sh.
--
-- Note this function assumes your locale uses utf8.
spawn' :: MonadIO m => String -> m ()
spawn' x = spawnPIDTCSH x >> return ()

-- | Like 'spawn', but returns the 'ProcessID' of the launched application
spawnPIDTCSH :: MonadIO m => String -> m ProcessID
spawnPIDTCSH x = xfork $ executeFile "/bin/tcsh" False ["-c", encodeString  
x] Nothing

Now, when I execute something like

spawn' "dmenu_run"

It works reliably.

Hope this helps, although you might be experiencing a different issue.

Regards,
Tim

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings


More information about the xmonad mailing list