Difference between revisions of "User:Kenyon"

From HaskellWiki
Jump to navigation Jump to search
(update config)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
Yo. I am http://KenyonRalph.com/.
Yo.
 
   
 
My xmonad.hs as of 20081209:
 
My xmonad.hs as of 20081209:
Line 20: Line 20:
 
myManageHook = composeAll . concat $
 
myManageHook = composeAll . concat $
 
[ [ title =? t --> doFloat | t <- myTitleFloats]
 
[ [ title =? t --> doFloat | t <- myTitleFloats]
, [ className =? c --> doFloat | c <- myClassFloats ] ]
+
, [ className =? c --> doFloat | c <- myClassFloats ]
  +
, [ appName =? a --> doFloat | a <- myAppFloats ] ]
 
where
 
where
  +
myTitleFloats = ["Transferring" -- for the KDE "open link" popup from konsole
myTitleFloats = ["Transferring"]
 
  +
, "Firefox Preferences"
myClassFloats = ["Pinentry"]
 
  +
]
 
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
 
main = do
Line 45: Line 53:
 
} `additionalKeys`
 
} `additionalKeys`
 
[((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")]
 
[((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")]
</haskll></haskell>
+
</haskell>

Latest revision as of 11:15, 20 December 2008

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