xmonad logo

      xmonad

      contributed code

about

Third party config settings and scripts to xmonad are collected in the xmonad contrib darcs repository. This package collects Haskell extensions to Config.hs, and also external scripts and programs that work with xmonad. If extensions are simple, and clean, they're sometimes moved into the core xmonad code. Such extensions are also listed here:

extensions to the core

The following extensions are now available by default in xmonad:

Popup statusbar

Use mod-b to raise or lower a 'gap' on any (or all) edges of the screen. This is suitable for running a dzen (or other) status bar in. You may place gaps on any edge of the screen, and have different gaps on different physical screens. Some examples:

The first screenshot shows a dzen status bar obtained by adding the following to a .xsession file:

    status | dzen2 -p -ta r -fg '#a8a3f7' -bg '#3f3c6d' \
                -fn '-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso8859-1' &
    /home/dons/bin/xmonad
    

Where 'status' prints the load and other data to stdout.

Here's a screenshot of KDE's kicker status bar running at the bottom of the xmonad screen (!)

Floating layer

xmonad versions after 0.2 support a floating layer per workspace. Clients may be raised into the floating layer, where they are sized and moved manually, or sunk back to the tiling layer, where the automated window management takes over. Here's a screenshot of a single floating window over a tiled layer, with a dzen status bar.

Status bar information

xmonad versions after 0.2 supports logging of their internal state, via logging hooks in Config.hs. Rather than build in a status bar, xmonad delegates that to external tools (such as dzen). A useful logHook would print out to stdout the exactly string you want displayed in an dzen status bar. An example dzen instance showing dynamically tagged workspaces, and another with a coloured cpu speed meter.

Logging is enabled by specifying a logHook functions in Config.hs (by default it is a no-op). On each state change, the logHook will run, and can do just about anything. See the dynamic logging logHook, for an example.

IncMaster

IncMaster, (now in the core), use mod-comma and mod-period to increase or decrease the number of windows stored in the master pane. Here, for example:

XRandR/rescreen

Rescreen. randr support for extracting screen information. The xrandr extension is supported, allowing multiple screens to be added, removed or rotated on the fly. See xrandr(1) for more details.

xcompmgr

See this screenshot of composite support, for highlight/shadows on the focused windows, and also an example of 'transset' (for transparent windows), plus shadowing:

contributed extensions

The following extensions are available from the contrib package. They are usually not written by the xmonad authors, and are unaudited for stability.

Mosaic tiling

Mosaic tiling, by David Roundy, adjustable windows and equal window area tiling. Screenshots below show gimp being used, with hidden windows, and configuring xmonad itself.

Spiral tiling

Spiral, by Joe Thornber, a fibonacci spiral layout algorithm, like below:

Circle tiling

Circle, an elliptical, overlapping layout, by Peter De Wachter:

Combining layouts

Combo, a layout for combining layouts, by David Roundy. Here, an example with with twoPane and tabbed layouts in separate panes:

Other contributed extensions

  • BackCompat. A module providing backwards compatibility with GHC 6.4.x libraries.
  • Commands. Allows you to run internal xmonad commands (X () actions) using a dmenu menu in addition to key bindings. Requires dmenu and the Dmenu XMonadContrib module. Effectively an interpreter for xmonad.
  • Dmenu, a convenient binding to dmenu.
  • DwmPromote, dwm-style 'promote' behaviour.
  • Dzen, dzen bindings.
  • FindEmptyWorkspace, cycle through empty workspaces.
  • GreedyView, when a workspace is already visible on another screen, greedyView swaps the contents of that other screen with the current screen.
  • HintedTile, a gapless tiled layout that attempts to obey window size hints, rather than simply ignoring them.
  • NamedWindows, associate windows with their titles.
  • RotView, bindings to cycle through non-empty workspaces.
  • SimpleDate, a pop up date menu.
  • Submap, allows the user to create a sub-mapping of keys bindings, meaning you can trigger submodes, as in many editors.
  • TwoPane, a layout algorithm that only displays the master and focused window on a workspace.Other windows are hidden. mod-j/k let you give hidden windows focus. Suitable for gimp or similar applications.
  • Warp, a binding to warp the pointer to a given window or screen.

using contributed extensions

Here's an example of how to use an extension from the contrib repo. First, download the extensions into your xmonad repo:

$ cd xmonad
$ darcs get http://darcs.haskell.org/~sjanssen/XMonadContrib
Copying patch 52 of 52... done!
Finished getting.

We'll use the 'SimpleDate' extension, which prints the current date in a popup status bar using dzen2.

    $ ls XMonadContrib 
README        SimpleDate.hs _darcs        examples

To use the SimpleDate.hs module, simply import it into your Config.hs:

    module Config where

import XMonadContrib.SimpleDate

and then add a key binding:

    , ((modMask,               xK_d     ), date) 

Now recompile xmonad as usual, and reload:

    $ runhaskell Setup.lhs build
$ rm -f `which xmonad`; runhaskell Setup.lhs install

and hit mod-q to reload. The simple date menu is now bound to mod-d!

contributing

If you have developed a nice feature for xmonad for people to use from their config files, please send us the code as a darcs patch to the contrib repository. To do this, download the contrib repo into your xmonad directory. Then put your code under XMonadContrib, following the examples provided in the repo. To send the patch use 'darcs send' to mail it to the xmonad@ list.