User:Kenyon

From HaskellWiki

Yo. I am http://KenyonRalph.com/.

My xmonad.hs as of 20081209:

import XMonad

import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks

import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)

import System.IO

import XMonad.Layout.NoBorders
--import XMonad.Layout.LayoutHints
--import XMonad.Layout.Spiral

myManageHook :: ManageHook
myManageHook = composeAll . concat $
    [ [ title =? t --> doFloat | t <- myTitleFloats]
    , [ className =? c --> doFloat | c <- myClassFloats ]
    , [ appName =? a --> doFloat | a <- myAppFloats ] ]
    where
	myTitleFloats = ["Transferring" -- for the KDE "open link" popup from konsole
			, "Firefox Preferences"
			]
	myClassFloats = ["Pinentry" -- for gpg passphrase entry
			, "Xscreensaver-demo"
			]
	myAppFloats = ["Download" -- for Firefox downloads dialog
		      , "Browser" -- for some firefox dialogs, like popup exception editor
		      ]

main = do
xmproc <- spawnPipe "~/.cabal/bin/xmobar ~/.xmonad/xmobar.config"
xmonad $ defaultConfig {
    terminal           = "konsole",

    modMask            = mod4Mask,

    manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig,

    layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig,

--    layoutHook = avoidStruts $ smartBorders $
--                 spiral (6/7) ||| layoutHook defaultConfig,

    logHook = dynamicLogWithPP $ xmobarPP {
                    ppOutput = hPutStrLn xmproc
                  , ppTitle = xmobarColor "green" "" . shorten 70
                  }
} `additionalKeys`
    [((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")]