[xmonad] xmonad and conky

Patrick Brisbin pbrisbin at gmail.com
Wed Apr 28 11:23:06 EDT 2010


On 04/28/10 at 08:57am, Kettmann, David H wrote:
> Hello all, I hope this is the right list, as I am not able to find
> much on my issue.
> 
> I am running XMonad and I love it! I am using dzen2 for my status bar
> and it works just fine. I also have another dzen2 bar setup that runs
> conky and it does not update. My clock is static at whenever my X
> session starts and my cpu, memory, and disk stats do not change. I'm
> not sure if this is a problem with XMonad, dzen2, or conky, but I've
> run out of places to look. Here is the relevant portion of my
> xmonad.hs file. If more is needed, let me know and I can paste it.
> 
> main = do -- Config starts dzen <- spawnPipe myStatusBar conkytop <-
> spawnPipe myTopBar conkympd <- spawnPipe myMPDBar checkTopicConfig
> myTopics myTopicConfig xmonad $ myUrgencyHook $ defaultConfig {
> terminal = myTerminal , normalBorderColor = myInactiveBorderColor ,
> focusedBorderColor = myActiveBorderColor , workspaces = myTopics ,
> modMask = myModMask , keys = myKeys , manageHook = myManageHook <+>
> manageDocks <+> manageHook defaultConfig , layoutHook = avoidStruts $
> myLayoutHook , logHook = dynamicLogWithPP $ myDzenPP dzen }
> 
> myStatusBar = "dzen2 -p -x '0' -y '0' -h '16' -w '1100' -ta 'l' -fg '"
> ++ myNormalFGColor ++ "' -bg '" ++ myNormalBGColor ++ "' -fn '" ++
> myFont ++ "'" myTopBar = "conky -c .conkytop | dzen2 -x '1100' -y '0'
> -h '16' -w '340' -ta 'r' -fg '" ++ myNormalFGColor ++ "' -bg '" ++
> myNormalBGColor ++ "' -fn '" ++ myFont ++ "'" myMPDBar = "conky -c
> .conkympd | dzen2 -x '1441' -y '0' -h '16' -w '1280' -ta 'l' -fg '" ++
> myNormalFGColor ++ "' -bg '" ++ myNormalBGColor ++ "' -fn '" ++ myFont
> ++ "'"

First, let me say I'm not extremely experienced with haskell/XMonad but
I do have a similar setup as you [1].

As I understand it, spawnPipe is to be used only when dzen or xmobar are
to be fed by XMonad itself (via a handle from myLogHook). In the case of
conky feeding dzen, that's just a standalone app that can be launched
via spawn.

1: here are the relevant part of my xmonad.hs; context can be found at
http://pbrisbin.com:8080/dotfiles/xmonad_xmonad.hs

  main = do
    d <- spawnPipe myLeftBar -- spawn the left statusbar
    spawn myRightBar         -- spawn the right statusbar
    spawn "conky"            -- spawn a standard conky

    -- and finally, start xmonad
    xmonad $ withUrgencyHook myUrgencyHook $ defaultConfig
      { terminal           = myTerminal
      , workspaces         = myWorkspaces
      , borderWidth        = myBorderWidth
      , normalBorderColor  = myNormalBorderColor

  -- snip

  -- essentially, just "conky -c file | dzen2 -options"
  myRightBar  = "conky -c " ++ conkyFile ++ " | " ++ makeDzen leftBarWidth 0 (monitorWidth - leftBarWidth) barHeight "r"


Hope it helps,
Pat

-- 
patrick brisbin


More information about the xmonad mailing list