My recipe for setting up Xmonad on Ubuntu GNU/Linux is here.
What is xmonad? Read this page to learn.
Some of these instructions were adapted from the Source Matters Blog. But I also depart from those instructions in certain ways.
First, download XQuartz. It's a replacement for the stock X11 utility that seems to work better with xmonad as far as TrueType fonts and keymappings are concerned.
Start up XQuartz, open Preferences.
- Under the Input tab, enable "Enable three button mouse" and "Option keys send Alt_L and Alt_R."
- Under the Output tab, set Colors to "millions". Don't select Full-Screen mode.
- Under the Pasteboard tab, enable all options.
- Under the Windows tab, I like choosing "Focus Follows Mouse."
Quit XQuartz.
For the following steps, you will need Homebrew. I'll assume you have it already.
Next brew install ghc haskell-platform
if you don't already have Haskell.
Next, install xmonad with cabal install xmonad
.
Create an ~/.xinitrc
file. This will be read when you start
XQuartz & launch xmonad immediately.
[[ -f ~/.Xresources ]] && xrdb -load ~/.Xresources
cd $HOME
xterm &
$HOME/.cabal/bin/xmonad
Create a ~/.Xdefaults
file. Put this in it:
xterm*Background: black
xterm*Foreground: green
xterm*cursorColor: purple
xterm*pointerShape: arrow
xterm*pointerColor: red
xterm*faceName: Monaco
xterm*faceSize: 9
Now restart XQuartz. You should be in xmonad. Press ALT+SHIFT+ENTER to open new window tiles. If xmonad seems unresponsive at first, click on the first xterm window to start capturing keyboard input.
You can change the colors, pointer, fontName and faceSize in .Xdefaults
. To see what
fonts you can choose from use this command: fc-list | less
.
To paste the contents of the pasteboard into an xmonad terminal, hold down OPTION and click the mouse/trackpad button.
To change font sizes for a particular window, you can use the popup xterm font menu, invoked with CTRL+COMMAND+click.
I got close to getting XMonad to work with Mountain Lion. Here are the steps I had to follow - plus some links that I didn't feel like copying everything from (the generally easy to find links on Google concerning getting XMonad on Mac).
Install XCode 5
install command line tools via XCode menu -> Preferences -> Downloads
Install Homebrew
at http://brew.sh
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew update
brew tap homebrew/versions
install XQuartz
xquartz.macosforge.org/landing/
install macports (just download from the site and follow the installer directions)
PATH=/opt/local/bin:$PATH
brew install ghc
(installs ghc 7.6.3)
sudo port install gcc_select
sudo port install gcc47 # this step takes a while
port select --list gcc # to see versions
sudo port select --set gcc mp-gcc47
hash gcc
vim /usr/local/Cellar/ghc/7.6.3/lib/ghc-7.6.3/settings
edit ("C compiler command", "/usr/bin/gcc"),
to be ("C compiler command", "/opt/local/bin/gcc")
cabal update
cabal install cabal-install
Install XMonad
cabal install xmonad
brew install pkg-config
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig
pkg-config --variable pc_path pkg-config
cabal install xmonad-contrib
https://gist.github.com/pyrtsa/6213784
https://gist.github.com/danchoi/3923233
http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_on_Apple_OSX
Now I'm getting an error related to XMonad seemingly not having the permissions to resize X11 windows. I want to tinker a bit with this before asking for help, but I thought I would put these steps out there for others to see if someone might be able to use these to get closer to figuring out how to get XMonad fully working on Mountain Lion.