Skip to content

Instantly share code, notes, and snippets.

@rking
Created June 14, 2012 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rking/2931432 to your computer and use it in GitHub Desktop.
Save rking/2931432 to your computer and use it in GitHub Desktop.
import XMonad
--- Note: This requires xmonad-contrib (on Gentoo, at least)
import XMonad.Layout.ThreeColumns
import XMonad.Layout.Tabbed
import XMonad.Layout.Accordion
import XMonad.Layout.NoBorders
import System.Process
import System.Exit
myLayout = ThreeCol 1 (3/100) (1/2) ||| ThreeColMid 1 (3/100) (1/2) ||| Full ||| noBorders (tabbed shrinkText defaultTheme) ||| Accordion
-- If xmodmap has, for example, mapped Caps_Lock to mod3, then use that:
myModMask = do retval <- system "xmodmap | grep '^mod3\\s*\\S*' >/dev/null"
if retval == ExitSuccess
then mod3Mask
else mod1Mask
main = xmonad defaultConfig
{ layoutHook = myLayout
, modMask = myModMask
, terminal = "LANG=en_US.utf8 urxvt" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment