Personal tools

Xmonad/Config archive/TeXitoi's xmonad.hs

From HaskellWiki

< Xmonad | Config archive
Revision as of 20:19, 12 December 2008 by Texitoi (Talk | contribs)

Jump to: navigation, search
import XMonad
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Layout.NoBorders
 
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import Data.Bits ((.|.))
 
main = xmonad defaults
 
defaults = defaultConfig {
        terminal = "urxvtc",
        modMask = mod4Mask,
        keys = \c -> mykeys c `M.union` keys defaultConfig c,
        manageHook = manageDocks <+> manageHook defaultConfig,
        logHook = ewmhDesktopsLogHook,
        layoutHook = smartBorders $ ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig,
        workspaces = map show [1..8],
        focusedBorderColor = "#729fcf",
        normalBorderColor = "#aaaaaa",
        borderWidth = 2
} where
        mykeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
                [((modMask, xK_b), sendMessage ToggleStruts),
                 ((modMask, xK_semicolon), sendMessage (IncMasterN (-1)))]
                ++
                [((m .|. modMask, k), windows $ f i)
                    | (i, k) <- zip (XMonad.workspaces conf) [0x26,0xe9,0x22,0x27,0x28,0x2d,0xe8,0x5f,0xe7,0xe0],
                    (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]