Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import XMonad
- import XMonad.Hooks.DynamicLog
- import XMonad.Hooks.ManageDocks
- import XMonad.Hooks.ManageHelpers
- import XMonad.Layout.NoBorders
- import XMonad.Layout.StackTile
- import XMonad.Layout.Gaps
- import XMonad.Layout.TwoPane
- import XMonad.Layout.ThreeColumns
- import XMonad.Layout.Circle
- import XMonad.Layout.Grid
- import XMonad.Util.Run(spawnPipe)
- import XMonad.Util.EZConfig
- import System.IO
- import qualified Data.Map as M
- main = do
- xmproc <- spawnPipe "/usr/bin/xmobar /home/caveat/.xmonad/xmobarrc"
- xmonad defaultConfig {
- modMask = mod4Mask
- , borderWidth = 2
- , normalBorderColor = "gray"
- , focusedBorderColor = "cyan"
- , terminal = "terminator"
- , workspaces = ["1:main", "2:devel", "3:editor", "4:files", "5:media", "6:office", "7:term", "8:www","9:misc"]
- , keys = mykeys
- , layoutHook = avoidStruts $ smartBorders $ layouts
- , manageHook = myManageHook <+> manageDocks
- , startupHook = spawn "terminator"
- , logHook = dynamicLogWithPP $ xmobarPP
- { ppOutput = hPutStrLn xmproc,
- ppTitle = xmobarColor "green" "" . shorten 50,
- ppCurrent = xmobarColor "orange" "" . wrap "[" "]"
- }
- }
- mykeys x = M.union (keys defaultConfig x) (keysToAdd x)
- where
- keysToAdd = \c -> mkKeymap c $ [
- ("M1-w", spawn "chromium"),
- ("M1-g", spawn "geany"),
- ("M1-r", spawn "/home/caveat/.xmonad/menu.sh") ]
- layouts = tiled ||| Mirror tiled ||| stacked ||| twopaned ||| threepaned ||| Circle ||| Grid ||| noBorders Full
- where
- tiled = Tall nmaster delta ratio
- stacked = StackTile nmaster delta ratio
- twopaned = TwoPane delta ratio
- threepaned = ThreeCol nmaster delta ratio
- nmaster = 1
- ratio = 1/2
- delta = 3/100
- myManageHook = composeAll
- [ className =? "Terminator" --> moveTo "7:term"
- , className =? "Iceweasel" --> moveTo "8:www"
- , className =? "Chromium" --> moveTo "8:www"
- , className =? "Thunar" --> moveTo "4:files"
- , className =? "Gnome-mplayer" --> moveTo "5:media"
- , className =? "Geany" --> moveTo "3:editor"
- , className =? "Gksu" --> doFloat
- ]
- where moveTo = doShift
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement