User:Kenyon

From HaskellWiki
Revision as of 03:43, 11 December 2008 by Kenyon (talk | contribs)

Jump to: navigation, search

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 ] ]
    where
        myTitleFloats = ["Transferring"]
        myClassFloats = ["Pinentry"]

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")]
</haskll>