import Control.Monad import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Layout import XMonad.Layout.Column import XMonad.Layout.LayoutBuilder import XMonad.Config.Desktop import XMonad.Hooks.SetWMName import qualified XMonad.StackSet as W import XMonad.Util.EZConfig import XMonad.Util.Run(spawnPipe) import System.IO mkLayout n = layoutN n mainBox (Just overFlowBox) layout overflowLayout where mainHeight = 0.75 -- Main window height mainWidth = 0.68 -- Main window width row = Mirror $ Column 1 -- a row of windows layout = Tall 1 0.03 mainWidth -- Top row layout overflowLayout = layoutAll (relBox 0 mainHeight 1 1) row -- bottom row layout mainBox = relBox 0 0 1 mainHeight -- Main box overFlowBox = relBox 0 0 1 1 -- Bottom row myLayout = ((mkLayout 2) ||| (mkLayout 1)) ||| Full myGmRunCommand = "gmrun 'rxvt'" main = do xmproc <- spawnPipe "xmobar" xmonad $ desktopConfig { terminal = "/usr/bin/rxvt" , focusFollowsMouse = False , layoutHook = avoidStruts myLayout , logHook = dynamicLogWithPP $ xmobarPP { ppLayout = xmobarColor "grey" "black" . (\ x -> pad "") , ppOutput = hPutStrLn xmproc } , workspaces = ["code", "communication", "random", "configuration"] } `additionalKeys` [ ((mod1Mask, xK_w), kill) , ((controlMask .|. mod1Mask, xK_Delete), spawn "gnome-screensaver-command --lock") , ((mod1Mask .|. shiftMask, xK_p), spawn myGmRunCommand) -- %! Launch gmrun , ((mod1Mask , xK_p), spawn myGmRunCommand) -- %! Launch gmrun ]