Personal tools

Xmonad/Config archive/Octoploid's xmonad.hs

From HaskellWiki

< Xmonad | Config archive(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
<haskell>  
 
<haskell>  
import XMonad.Core;
+
import XMonad.Core                                                                                                              
 
import XMonad
 
import XMonad
 
import XMonad.Layouts
 
import XMonad.Layouts
Line 17: Line 17:
 
main = do
 
main = do
 
       xmobar <- spawnPipe "xmobar"
 
       xmobar <- spawnPipe "xmobar"
       xmonad defaultConfig                                                                                                    
+
       xmonad defaultConfig
 
         { defaultGaps = [(15,0,0,0)]
 
         { defaultGaps = [(15,0,0,0)]
 
         , normalBorderColor  = "#222222"
 
         , normalBorderColor  = "#222222"
 
         , focusedBorderColor = "#6666ff"
 
         , focusedBorderColor = "#6666ff"
 
         , terminal = "gnome-terminal"
 
         , terminal = "gnome-terminal"
         , logHook = dynamicLogWithPP defaultPP {ppTitle = shorten 160, ppLayout = (\x -> ""), ppOutput = hPutStrLn xmobar}
+
         , logHook = dynamicLogWithPP defaultPP { ppTitle = shorten 160
 +
                                              , ppLayout = (\x -> "")
 +
                                              , ppOutput = hPutStrLn xmobar }
 
         , modMask = mod4Mask
 
         , modMask = mod4Mask
 
         , layoutHook = Layout (smartBorders (tiled ||| Full))
 
         , layoutHook = Layout (smartBorders (tiled ||| Full))
Line 40: Line 42:
  
 
     mykeys (XConfig {modMask = modm}) = M.fromList $
 
     mykeys (XConfig {modMask = modm}) = M.fromList $
             [((controlMask .|. modm, xK_Right), rotView True)
+
             [ ((controlMask .|. modm, xK_Right), rotView True)
             , ((controlMask .|. modm, xK_Left), rotView False)]
+
             , ((controlMask .|. modm, xK_Left), rotView False) ]
 
</haskell>
 
</haskell>
  
 
[[Category:XMonad configuration]]
 
[[Category:XMonad configuration]]

Revision as of 06:22, 8 November 2007

 
import XMonad.Core                                                                                                               
import XMonad
import XMonad.Layouts
import XMonad.Operations
import XMonad.Config (defaultConfig)
import XMonad.Layout.NoBorders
import XMonad.Hooks.DynamicLog
import XMonad.Actions.RotView
import Data.Bits
import qualified Data.Map as M
import XMonad.Util.Run (spawnPipe)
import System.IO (hPutStrLn)
import Graphics.X11
 
 
main = do
       xmobar <- spawnPipe "xmobar"
       xmonad defaultConfig
        { defaultGaps = [(15,0,0,0)]
        , normalBorderColor  = "#222222"
        , focusedBorderColor = "#6666ff"
        , terminal = "gnome-terminal"
        , logHook = dynamicLogWithPP defaultPP { ppTitle = shorten 160
                                               , ppLayout = (\x -> "")
                                               , ppOutput = hPutStrLn xmobar }
        , modMask = mod4Mask
        , layoutHook = Layout (smartBorders (tiled ||| Full))
        , keys = \c -> mykeys c `M.union` keys defaultConfig c
        }
 where
     tiled   = Tall nmaster delta ratio
 
     -- The default number of windows in the master pane
     nmaster = 1
 
     -- Default proportion of screen occupied by master pane
     ratio   = 0.618034 --golden
 
     -- Percent of screen to increment by when resizing panes
     delta   = 0.03
 
     mykeys (XConfig {modMask = modm}) = M.fromList $
             [ ((controlMask .|. modm, xK_Right), rotView True)
             , ((controlMask .|. modm, xK_Left), rotView False) ]