[Xmonad] Re: xmobar-0.4 - the xmonad status bar - released!

Andrea Rossato mailing_list at istitutocolli.org
Fri Jul 6 03:23:31 EDT 2007


On Thu, Jul 05, 2007 at 10:13:04PM +0000, Xavier Maillard wrote:
> Would you mind eventually posting your whole config (xmonad and xmobar) so I can
> try it here ? I am really no haskell master at all and tweaking Config.hs is too
> hard :)

Sure. This is my xmobar config (works with the darcs version. For 0.4
change "font" to "fonts", "height" to "hight" and "<fc=yellow>" to
<fc=##ee9a00>":
Anyway it is almost the same as xmobar.config-sample that you find in
the distributed tarballs.

Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
       , bgColor = "#000000"
       , fgColor = "#BFBFBF"
       , xPos = 0
       , yPos = 0
       , width = 1024
       , height = 15
       , align = "center"
       , refresh = 10
       , commands = [ ("xmb-weather", 36000, ["LIPB"])
                    , ("xmb-net", 10, ["eth1"])
                    , ("xmb-mem", 100, ["-t \"Mem: <usedratio>% (<cache>M)\""])
                    , ("date",600,["+\"%a %b %_d %H:%M %Y\""])
                    ]
       , sepChar = "%"
       , template = "%xmb-cpu% | %xmb-net% | %xmb-mem% * %xmb-swap% | %xmb-weather% | <fc=yellow>%date%</fc> | %xmb-batt%"
       }

Change xPos and yPos if you want it at the bottom (this is going to be
place at the very top of the screen).

The screen shot displays ScreenLayout with: the default layout on the
left and the tabbed layout on the right. This is what I added (or
edited) in the XMonad Config.hs file:

import XMonadContrib.Tabbed
import XMonadContrib.LayoutScreens
import XMonadContrib.TwoPane
import XMonadContrib.DwmPromote

--these colors are ugly, I was just testing the configuration
myconfig = defaultTConf {bgColor = "#FF0000", textColor = "#00FF00"}

-- edit the following to match:
defaultGaps :: [(Int,Int,Int,Int)]
defaultGaps = [(0,15,15,0)]

defaultLayouts :: [Layout Window]
defaultLayouts = [ tabbed shrinkText myconfig, tiled , mirror tiled , full ]

-- added to keys:
    , ((modMask .|. shiftMask, xK_space), layoutScreens 2 (twoPane 0.5 0.5))
    , ((controlMask .|. modMask .|. shiftMask, xK_space), rescreen)
    , ((modMask,               xK_Return), dwmpromote)


That's it.
To get the two screens just press mod+shift+space.

Finally on the right you can see Viperator (a firefox extension: find
more about it on the xmonad.org home page).

Hope this helps.
All the best
Andrea


More information about the Xmonad mailing list