
When I restart xmonad with a M-q command my xmobar disappears. There's an xmobar process running and it's not obviously blocked. (strace shows it doing things, including recvfrom and writev both with non-zero positive return codes). Xmonad also appears to think it's there in at least some sense because there's a strut on the top of the screen. But instead of there being anything visible, I can just see the wallpaper window... This is all under LightDM/Ubuntu12.04. If I attempt to alter the "root window" (with something like display -window root some.jpg) the wallpaper doesn't change, suggesting that there is a wallpaper window lying on top of the "real root window". Also, the wallpaper responds to right-clicks and brings up a gnome-config type menu. So, perhaps my xmobar restarts underneath the wallpaper and is thus obscured. If so, how might I bring it to the fore? I'm running a cabal xmonad and xmobar on top of Ubuntu12.04, with an /usr/share/xsessions/xmonad.desktop that looks like: [Desktop Entry] Encoding=UTF-8 Name=XMonad Comment=Lightweight tiling window manager Exec=gnome-session --session=xmonad Icon=xmonad.png Type=XSession and a /usr/share/gnome-session/sessions/xmonad.session that looks like: [GNOME Session] Name=Xmonad session RequiredComponents=gnome-settings-daemon; RequiredProviders=windowmanager;notifications; DefaultProvider-windowmanager=xmonad DefaultProvider-notifications=notification-daemon Thanks, Michael

On Thu, May 31, 2012 at 10:03 PM, Michael Norrish < michael.norrish@nicta.com.au> wrote:
When I restart xmonad with a M-q command my xmobar disappears. There's an xmobar process running and it's not obviously blocked. (strace shows it doing things, including recvfrom and writev both with non-zero positive return codes).
Given that you're using the Ubuntu Gnome/Xmonad session, it's trapped under the nautilus desktop window. You probably want to set "lowerOnStart = False" in ~/.xmobarrc. If this isn't sufficient and you need to actively raise it, something like this in the ManageHook might work: appName =? "xmobar" --> liftX . withDisplay . (io .) . flip raiseWindow =<< ask -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On 01/06/12 12:25, Brandon Allbery wrote:
On Thu, May 31, 2012 at 10:03 PM, Michael Norrish
mailto:michael.norrish@nicta.com.au> wrote: When I restart xmonad with a M-q command my xmobar disappears. There's an xmobar process running and it's not obviously blocked. (strace shows it doing things, including recvfrom and writev both with non-zero positive return codes).
Given that you're using the Ubuntu Gnome/Xmonad session, it's trapped under the nautilus desktop window. You probably want to set "lowerOnStart = False" in ~/.xmobarrc.
This seems to do the trick; thanks!
If this isn't sufficient and you need to actively raise it, something like this in the ManageHook might work:
appName =? "xmobar" --> liftX . withDisplay . (io .) . flip raiseWindow =<< ask
This fails with xmonad.hs:122:76: Couldn't match expected type `Endo WindowSet' with actual type `()' Expected type: Display -> Window -> IO (Endo WindowSet) Actual type: Display -> Window -> IO () In the first argument of `flip', namely `raiseWindow' In the second argument of `(.)', namely `flip raiseWindow' But I'll try to get back to the list with a version that works (for future reference). Michael

On Thu, May 31, 2012 at 10:35 PM, Michael Norrish < michael.norrish@nicta.com.au> wrote:
appName =? "xmobar" --> liftX . withDisplay . (io .) . flip raiseWindow =<< ask
xmonad.hs:122:76: Couldn't match expected type `Endo WindowSet' with actual type `()' Expected type: Display -> Window -> IO (Endo WindowSet) Actual type: Display -> Window -> IO () In the first argument of `flip', namely `raiseWindow' In the second argument of `(.)', namely `flip raiseWindow'
But I'll try to get back to the list with a version that works (for future reference).
*sigh* I always forget mangling it back to the type ManageHook expects... appName =? "xmobar" --> (liftX . withDisplay . (io .) . flip raiseWindow =<< ask) <+> idHook and may require extra parentheses depending on how you mix it into an existing ManageHook. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On 01/06/12 12:55, Brandon Allbery wrote:
*sigh* I always forget mangling it back to the type ManageHook expects...
appName =? "xmobar" --> (liftX . withDisplay . (io .) . flip raiseWindow =<< ask) <+> idHook
and may require extra parentheses depending on how you mix it into an existing ManageHook.
I'm afraid that gives exactly the same error. An earlier post of yours to this mailing list (http://www.haskell.org/pipermail/xmonad/2011-June/011495.html) has
manageUtility :: ManageHook manageUtility = ask >>= \win -> liftX (withDisplay $ \dpy -> io $ raiseWindow dpy win) >> doFloat
The doFloat on the end is necessary to get the type-error to go away. Presumably idHook would be better there, making the entry appName =? "xmobar" --> (ask >>= \win -> liftX (withDisplay $ \dpy -> io $ raiseWindow dpy win) >> idHook) If the .xmobarrc has lowerOnStart set to True, the above doesn't help. (Nor does the version with doFloat.) So, in my situation it looks as if it has to be lowerOnStart = False in the .xmobarrc. Michael

On Fri, Jun 1, 2012 at 12:33 AM, Michael Norrish < michael.norrish@nicta.com.au> wrote:
appName =? "xmobar" --> (ask >>= \win -> liftX (withDisplay $ \dpy -> io $ raiseWindow dpy win) >> idHook)
If the .xmobarrc has lowerOnStart set to True, the above doesn't help. (Nor does the version with doFloat.)
It wouldn't; the lowerOnStart happens concurrently, and probably (but not certainly) after the above. I am a bit confused about how something that typechecked in ghci here didn't work, but I'm still bringing this machine back toward something resembling sanity and in particular its ghc and/or xmonad may be slightly deranged (I'm waiting on the HP update that was supposed to happen today). -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (2)
-
Brandon Allbery
-
Michael Norrish