Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (58 sloc) 2.51 KB
-- Sources:
-- http://haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- http://www.xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Doc-Configuring.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Doc-Extending.html
-- http://hackage.haskell.org/packages/archive/xmonad-contrib/0.8.1/doc/html/XMonad-Actions-CycleWS.html
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe) -- Need this guy for talking to xmobar
import XMonad.Actions.CycleWS
import XMonad.Layout.Tabbed -- layouts
import XMonad.Layout.Accordion
import XMonad.Layout.NoBorders
import System.IO
-- I think we do this because otherwise Data.Map.keys would overlap
-- with XMonad.keys:
import qualified Data.Map as M
-- import XMonad.Util.EZConfig(additionalKeys)
-- import XMonad.Prompt
-- import XMonad.Prompt.Shell
-- import XMonad.Prompt.XMonad
-- This is some crazy shit, man:
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ borderWidth = 1
, normalBorderColor = "#281DF2"
, focusedBorderColor = "#24AD09"
, workspaces = ["top", "mail", "irc", "code", "browse", "music", "graphics", "hiring"]
, terminal = "uxterm"
, keys = newKeys
, manageHook = manageDocks <+> myManageHook
<+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP $ xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
}
newKeys x = M.union (keys defaultConfig x) (M.fromList (myKeys x))
myKeys x =
[ ((modMask x, xK_Right), nextWS)
, ((modMask x, xK_Left), prevWS)
, ((modMask x .|. shiftMask, xK_Down), shiftToNext)
, ((modMask x .|. shiftMask, xK_Up), shiftToPrev)
-- Don't need these, for now...
-- , ((modMask x, xK_Right), nextScreen)
-- , ((modMask x, xK_Left), prevScreen)
, ((modMask x .|. shiftMask, xK_Right), shiftNextScreen)
, ((modMask x .|. shiftMask, xK_Left), shiftPrevScreen)
, ((modMask x, xK_z), toggleWS)
]
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "Nautilus" --> doFloat
]
You can’t perform that action at this time.