Skip to content

Instantly share code, notes, and snippets.

@olibob
Created August 10, 2013 11:47
Show Gist options
  • Save olibob/6200141 to your computer and use it in GitHub Desktop.
Save olibob/6200141 to your computer and use it in GitHub Desktop.
xmonad config
import XMonad
import XMonad.Config.Azerty
import qualified Data.Map as M
-- http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- followinf the tutorial
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
main = do
xmproc <- spawnPipe "xmobar"
xmonad $ defaultConfig
{ keys = \c -> azertyKeys c `M.union` keys defaultConfig c
, borderWidth = 2
, normalBorderColor = "#cccccc"
, focusedBorderColor = "#e11a1a"
-- This particular recipe comes from the Xmonad FAQ and adds the support we need for a status bar and dock.
, manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 80
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment