The following modules from xmonad-contrib make it easy to start with good basic defaults to work within the given desktop environment. They set up better communication between xmonad and taskbars or status bars through EWMH's, allow gap toggling, and rebind run and logout keys to sensible desktop environment defaults.

+

The following modules from xmonad-contrib make it easy to start with

+

good basic defaults to work within the given desktop environment (DE).

+

Make sure both the xmonad and xmonad-contrib packages are installed and

+

of the same version, then import the appropriate Config module and begin

+

with one of the example configs below.

−

You will still need to set up your session management and tell your desktop environment (DE) to use xmonad as described in the DE specific documents on [[Xmonad]], but the ff. will take care of getting xmonad's part of the puzzle working with a useful default configuration.

+

The desktop configs enable communication between xmonad and pagers, taskbars,

They also set a prettier root window mouse cursor, bind the default key for

+

gap toggling, and rebind run and logout keys to sensible desktop environment

+

defaults.

−

Start with the appropriate version below in <code>~/.xmonad/xmonad.hs</code> then start or restart xmonad.hs to have xmonad recompile the binary in <code>~/.xmonad/</code> to use your new settings.

+

You will still need to set up your session management and tell your DE to use xmonad as described in the DE specific documents on [[Xmonad]], but the following will take care of getting xmonad's part of the puzzle working with a useful default configuration.

−

XMonad.Config.Xfce

+

Once your DE is ready to use xmonad, placing the appropriate version below in <code>~/.xmonad/xmonad.hs</code> will ensure xmonad is ready to work with the DE.

+

+

== Basic desktop config examples ==

+

The core functionality used by all the specific DE configs. (Useful if you just want support for a few specific EWMH apps, or are running something other than KDE, Gnome, or xfce.)

+

<haskell>

+

import XMonad

+

import XMonad.Config.Desktop

+

+

main = xmonad desktopConfig

+

</haskell>

+

+

An xmonad.hs for xfce

<haskell>

<haskell>

import XMonad

import XMonad

Line 15:

Line 34:

</haskell>

</haskell>

−

XMonad.Config.Gnome

+

An xmonad.hs for Gnome

<haskell>

<haskell>

import XMonad

import XMonad

Line 23:

Line 42:

</haskell>

</haskell>

−

XMonad.Config.Kde

+

An xmonad.hs for KDE

<haskell>

<haskell>

import XMonad

import XMonad

Line 29:

Line 48:

main = xmonad kdeConfig

main = xmonad kdeConfig

+

-- or for kde 4 (> xmonad-0.8*, darcs xmonad)

+

-- xmonad kde4Config

+

</haskell>

+

+

== Customizing desktop environment configs ==

+

+

See the documentation for the [http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Config-Desktop.html XMonad.Config.Desktop] module for more details on customizing the desktop configs. However, here are examples of the most common customizations:

+

+

===Modifying layouts, manageHook, or key bindings===

+

+

See also [http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html Util.EZConfig] for more options for modifying key bindings. To add to layouts, manageHook or key bindings use something like the following to combine your modifications with the desktop config settings:

+

+

<haskell>

+

import XMonad

+

import XMonad.Config.Desktop

+

import XMonad.Layout.Tabbed

+

import XMonad.Util.EZConfig (additionalKeys)

+

+

main =

+

xmonad $ desktopConfig {

+

-- add manage hooks while still ignoring panels and using default manageHooks

+

manageHook = myManageHook <+> manageHook desktopConfig

+

+

-- add a fullscreen tabbed layout that does not avoid covering

+

-- up desktop panels before the desktop layouts

+

, layoutHook = simpleTabbed ||| layoutHook desktopConfig

+

}

+

-- add a screenshot key to the default desktop bindings

+

`additionalKeys` [ ((mod4Mask, xK_F8), spawn "scrot") ]

+

</haskell>

+

+

To replace the desktop layouts with your own choices, but still allow toggling panel visibility, use desktopLayoutModifiers to modify your layouts:

Revision as of 10:18, 1 January 2011

Contents

1 Using Desktop Environment Config Modules

The following modules from xmonad-contrib make it easy to start with
good basic defaults to work within the given desktop environment (DE).
Make sure both the xmonad and xmonad-contrib packages are installed and
of the same version, then import the appropriate Config module and begin
with one of the example configs below.

You will still need to set up your session management and tell your DE to use xmonad as described in the DE specific documents on Xmonad, but the following will take care of getting xmonad's part of the puzzle working with a useful default configuration.

Once your DE is ready to use xmonad, placing the appropriate version below in ~/.xmonad/xmonad.hs will ensure xmonad is ready to work with the DE.

1.1 Basic desktop config examples

The core functionality used by all the specific DE configs. (Useful if you just want support for a few specific EWMH apps, or are running something other than KDE, Gnome, or xfce.)

1.2 Customizing desktop environment configs

See the documentation for the XMonad.Config.Desktop module for more details on customizing the desktop configs. However, here are examples of the most common customizations:

1.2.1 Modifying layouts, manageHook, or key bindings

See also Util.EZConfig for more options for modifying key bindings. To add to layouts, manageHook or key bindings use something like the following to combine your modifications with the desktop config settings: