cleaning var naming

This commit is contained in:
Hunter Haugen 2009-11-04 09:42:09 +05:30
parent 6078c736da
commit 120d90f6fe

View file

@ -1,10 +1,5 @@
-- --
-- xmonad example config file. -- xmonad config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
-- --
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE NoMonomorphismRestriction #-}
@ -30,26 +25,25 @@ import Data.Maybe
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import qualified Data.Map as M import qualified Data.Map as M
-- myTerminal = "urxvt;ps -U $USER |grep dzen2|awk '{print $1}'|xargs kill -USR1" -- mTerminal = "urxvt;ps -U $USER |grep dzen2|awk '{print $1}'|xargs kill -USR1"
-- mTerminal = "urxvtc"
mterminal = "urxvtc" mBorderWidth = 1
mborderWidth = 1 mModMask = mod4Mask
mmodMask = mod4Mask
-- A tagging example: -- A tagging example:
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9] -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
-- --
mworkspaces :: [WorkspaceId] mWorkspaces :: [WorkspaceId]
mworkspaces = map show [1 .. 9 :: Int] mWorkspaces = map show [1 .. 9 :: Int]
-- Border colors for unfocused and focused windows, respectively. -- Border colors for unfocused and focused windows, respectively.
-- --
mnormalBorderColor = "#999999" mNormalBorderColor = "#999999"
mfocusedBorderColor = "#dd0000" mFocusedBorderColor = "#dd0000"
-- Custom keys -- Custom keys
-- --
mkeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window mKeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
, ("M-S-t", sendMessage MirrorExpand ) -- Shrink current window , ("M-S-t", sendMessage MirrorExpand ) -- Shrink current window
, ("M-b" , withFocused toggleBorder ) -- Toggle the border of the currently focused window , ("M-b" , withFocused toggleBorder ) -- Toggle the border of the currently focused window
, ("M-g" , warpToCentre >> promptedWs) -- Gridselect to pick windows , ("M-g" , warpToCentre >> promptedWs) -- Gridselect to pick windows
@ -71,10 +65,10 @@ mkeys = [ ("M-S-n", sendMessage MirrorShrink ) -- Expand current window
-- Dynamic workspace commands -- Dynamic workspace commands
, ("M-S-<Backspace>" , removeWorkspace) , ("M-S-<Backspace>" , removeWorkspace)
, ("M-S-w" , selectWorkspace myXPConfig) , ("M-S-w" , selectWorkspace mXPConfig)
, ("M-S-r" , renameWorkspace myXPConfig) , ("M-S-r" , renameWorkspace mXPConfig)
, ("M-m" , withWorkspace myXPConfig (windows . W.shift)) , ("M-m" , withWorkspace mXPConfig (windows . W.shift))
, ("M-S-m" , withWorkspace myXPConfig (windows . copy)) , ("M-S-m" , withWorkspace mXPConfig (windows . copy))
] ]
-- Don't auto-assign the key shortcuts -- Don't auto-assign the key shortcuts
-- ++ -- ++
@ -107,8 +101,8 @@ gsConfig = defaultGSConfig { gs_navigate = neiu `M.union` gs_navigate (defaultGS
,((0,xK_u),(0,-1))] ,((0,xK_u),(0,-1))]
-} -}
myXPConfig :: XPConfig mXPConfig :: XPConfig
myXPConfig = defaultXPConfig { fgColor = "#dd0000", bgColor = "black", borderColor = "#dd0000" } mXPConfig = defaultXPConfig { fgColor = "#dd0000", bgColor = "black", borderColor = "#dd0000" }
gsConfig = defaultGSConfig gsConfig = defaultGSConfig
{ gs_navigate = M.unions { gs_navigate = M.unions
@ -131,7 +125,7 @@ gsConfig = defaultGSConfig
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Layouts: -- Layouts:
mlayout = smartBorders Full ||| tiled ||| Mirror tiled ||| simplestFloat mLayout = smartBorders Full ||| tiled ||| Mirror tiled ||| simplestFloat
where where
-- default tiling algorithm partitions the screen into two panes -- default tiling algorithm partitions the screen into two panes
--tiled = Tall nmaster delta ratio --tiled = Tall nmaster delta ratio
@ -151,7 +145,7 @@ mlayout = smartBorders Full ||| tiled ||| Mirror tiled ||| simplestFloat
-- Window rules: -- Window rules:
-- > xprop | grep WM_CLASS -- > xprop | grep WM_CLASS
-- --
mmanageHook = composeAll mManageHook = composeAll
[ className =? "MPlayer" --> doFloat [ className =? "MPlayer" --> doFloat
, title =? "VLC media player" --> doFloat , title =? "VLC media player" --> doFloat
, className =? "Gimp" --> doFloat , className =? "Gimp" --> doFloat
@ -167,8 +161,8 @@ mmanageHook = composeAll
, resource =? "kdesktop" --> doIgnore ] , resource =? "kdesktop" --> doIgnore ]
-- Whether focus follows the mouse pointer. -- Whether focus follows the mouse pointer.
mfocusFollowsMouse :: Bool mFocusFollowsMouse :: Bool
mfocusFollowsMouse = True mFocusFollowsMouse = True
{- {-
[14:25] dschoepe : Hunner: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8798#a8798 [14:25] dschoepe : Hunner: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8798#a8798
@ -193,14 +187,14 @@ pickyFocusEventHook _ = return $ All True
-- --
main = do main = do
xmonad $ defaultConfig xmonad $ defaultConfig
{ terminal = mterminal { terminal = mTerminal
, focusFollowsMouse = mfocusFollowsMouse , focusFollowsMouse = mFocusFollowsMouse
, borderWidth = mborderWidth , borderWidth = mBorderWidth
, modMask = mmodMask , modMask = mModMask
, workspaces = mworkspaces , workspaces = mWorkspaces
, normalBorderColor = mnormalBorderColor , normalBorderColor = mNormalBorderColor
, focusedBorderColor = mfocusedBorderColor , focusedBorderColor = mFocusedBorderColor
, layoutHook = mlayout , layoutHook = mLayout
, manageHook = mmanageHook , manageHook = mManageHook
, handleEventHook = pickyFocusEventHook , handleEventHook = pickyFocusEventHook
} `additionalKeysP` mkeys } `additionalKeysP` mKeys