Personal tools

Xmonad/Config archive/TeXitoi's xmonad.hs

From HaskellWiki

< Xmonad | Config archive(Difference between revisions)
Jump to: navigation, search
(Add smartBorders)
Line 19: Line 19:
 
logHook = ewmhDesktopsLogHook,
 
logHook = ewmhDesktopsLogHook,
 
layoutHook = smartBorders $ ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig,
 
layoutHook = smartBorders $ ewmhDesktopsLayout $ avoidStruts $ layoutHook defaultConfig,
workspaces = ["1","2","3","4","5","6","7","8"],
+
workspaces = map show [1..8],
 
focusedBorderColor = "#729fcf",
 
focusedBorderColor = "#729fcf",
 
normalBorderColor = "#aaaaaa",
 
normalBorderColor = "#aaaaaa",

Revision as of 20:19, 12 December 2008

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)]]