Difference between revisions of "User:Kenyon"

From HaskellWiki
Jump to: navigation, search
 
Line 1: Line 1:
 
Yo.
 
Yo.
  +
  +
My xmonad.hs as of 20081209:
  +
<haskell>
  +
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></haskell>

Revision as of 07:37, 10 December 2008

Yo.

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>