aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Config/Desktop.hs
blob: 1959aa8bd32d196f15375a6dc126d6ffdd6f90f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}

-----------------------------------------------------------------------------
-- |
-- Module       : XMonad.Config.Desktop
-- Copyright    : (c) Spencer Janssen <spencerjanssen@gmail.com>
-- License      : BSD
--
-- Maintainer   : Spencer Janssen <spencerjanssen@gmail.com>
--
-- This module provides a config suitable for use with a desktop
-- environment such as KDE or GNOME.

module XMonad.Config.Desktop (
    desktopConfig,
    desktopLayoutModifiers
    ) where

import XMonad
import XMonad.Config (defaultConfig)
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops

import qualified Data.Map as M

desktopConfig = defaultConfig
    { logHook    = ewmhDesktopsLogHook
    , layoutHook = desktopLayoutModifiers $ layoutHook defaultConfig
    , manageHook = manageHook defaultConfig <+> manageDocks
    , handleEventHook = ewmhDesktopsEventHook
    , keys       = \c -> desktopKeys c `M.union` keys defaultConfig c }

desktopKeys (XConfig {modMask = modm}) = M.fromList $
    [ ((modm, xK_b), sendMessage ToggleStruts) ]

desktopLayoutModifiers layout = avoidStruts layout