Issue 493 in xmonad: spawnPipe opens another instance of the applicatioon

Status: New Owner: ---- New issue 493 by argu...@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 What steps will reproduce the problem? 1. Have a spawnPipe on xmonad.hs 2. Hit Mod+Q 3. See a duplicate xmobar running. What is the expected output? What do you see instead? When pressing Mod+Q it should kill my xmobar instance and open another one. When pressing Mod+Q it start another xmobar instance. What version of the product are you using? On what operating system? xmonad-darcs 20111213-1 3.2.2-1-ARCH Are you using an xmonad.hs? Please attach it and the output of "xmonad --recompile". No output on "xmonad --recompile" Please provide any additional information below. Attachments: xmonad.hs 14.1 KB

Comment #1 on issue 493 by allber...@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 This suggests that xmobar is not properly configured; you have xmonad.hs set up with DynamicLog, but xmobar is not listening for that data (and therefore won't know when xmonad is restarted, so it won't shut itself down). What does your ~/.xmobarrc look like? It should include a StdinReader *and* have %StdinReader% somewhere in the template; if you don't do both of those, it won't be reading its input and (a) it won't go away on restart (b) it won't show things like current workspace (c) xmonad will eventually hang (unless you are using GHC from git, or possibly the latest prerelease that came out something like 2 days ago).

Comment #2 on issue 493 by argu...@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 I should have been more specific. This issue happens with my second xmobar, which doesn't have the DynamicLog Hook. It's for monitoring MPD, WLAN0, ETH0, and UpTime. I've attached my .xmobar2rc so you can take a look at it. Every time I plug my secondary monitor to the laptop, I use Mod+Q so xmobars fit into the new screen resolution. Maybe there is a wise way to do this without recompiling. Attachments: .xmobar2rc 896 bytes

Comment #3 on issue 493 by allber...@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 The restart-on-mod-q behavior specifically depends on it actually using the pipe and being fed data by xmonad; if you don't have a StdinReader configured and referenced in the template, xmobar won't care what happens on its stdin and won't exit when the pipe from xmonad goes away. (You may want to take this up with xmobar's current maintainer; see http://github.com/jaor/xmobar) Alternately, you could rebind mod-q to explicitly kill any running xmobar-s. (No, this is not supposed to be a standard behavior; if xmonad isn't directly feeding it, xmonad should not be killing it.)

Comment #4 on issue 493 by MathStuf@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 I would recommend using xmonadpropwrite instead of spawnPipe in this case. An example of xmobarrc[1] xmonad.hs[2] are in my dotfiles repo. Not all distros package xmonadpropwrite (it's a script in the xmobar repo, but not built by default). I install it for Fedora, but you may have to ask your distro to ship it as well. [1]http://git.benboeckel.net/dotfiles.git/tree/dotfiles/base/X11/xmobar/xmobarr... [2]http://git.benboeckel.net/dotfiles.git/tree/dotfiles/base/X11/xmonad/xmonad/...

Comment #5 on issue 493 by argu...@gmail.com: spawnPipe opens another instance of the applicatioon http://code.google.com/p/xmonad/issues/detail?id=493 Used StdinReader on my second xmobar, I think it's working now. :) Thanks.
participants (1)
-
codesite-noreply@google.com