From ArchWiki
Revision as of 21:11, 15 June 2008 by Mr.Elendig (Talk | contribs) (Initial page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Xmobar#)


xmobar is a lightweight bar written in haskell. It is one of the most popular bars to use together with Xmonad.
Even tho it is written in haskell, you don't need to know haskell to configure it.


There are currently two versions of xmobar available trough aur. Xmobar and xmobar-darcs, you can also get it directly from the xmobar homepage.


You can configure xmobar both with passing it args at start, and by editing ~/.xmobarrc

Using ~/.xmobarrc

Following is a short description of the options you can use in ~/.xmobarrc

The font to use. If you got XFT fonts enabled, prefix XFT fonts with xft:
The default colour to use for the font, takes both colour names and hex colours.
The colour of the bar, takes both colour names and hex colours.
The position of the bar. Keywords are: Top, TopW, Bottom, BottomW and Static.
  • Top/Bottom - The top/bottom of the screen.
  • TopW/BottomW - The top/bottom of the screen with a fixed with. They take 2 options:
    • Alignment: Left, Center or Right aligned.
    • Width: An iteger for the width of the bar in percent.
Example: Centered at the bottom of the screen, with a width of 75% of the screen.
position = BottomW C 75
  • Static - A fixed position on the screen, with a fixed with. Static takes 4 keyword arguments:
    • xpos: Horisontal position in pixels, starting at the upper left corner.
    • ypos: Vertical position in pixels, starting at the upper left corner.
    • width: The width of the bar in pixels.
    • height: The height of the bar in pixels.
Example: Top left of the screen, with a width of 1024 pixels and height of 15 pixels
position = Static { xpos = 0 , ypos = 0, width = 1024, height = 15 }
For setting the options of the programs to run (optional).
The character to be used for indicating commands in the output template (default '%').
A string of characters for aligning text in the output template. (default '}{') The text before the first char will be left aligned, the text between them will be centered, and the text to the right of the last char will be right aligned.
The output template. It is a string containing text and commands.
  •  %command% - An command to run. The output can contain a flag to set the colour of the text. You can chage the '%' to some other char with sepChar
  • <fc=colour></fc> - Sets the colour of a partion of text, takes both colour names and hex colours.