Talk:Xmonad/Using xmonad on Apple OSX

From HaskellWiki
Revision as of 22:36, 4 April 2009 by Chris (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

I suggest the current text is put under the title Tiger and made Tiger specific (which it mostly is).

I'm not going to commit this immediately - among other things I need to check my instructions work.

Leopard

These instructions have been tested on a blank but fully updated system (04/04/09).

Install xmonad

Installing GHC

  1. Install xcode, this can be found on the OSX install disk; it can also be downloaded from apple (you will have to sign upto a free developer account).
  2. Download and install ghc.

Installing Cabal

  1. Download and extract Cabal install from http://www.haskell.org/cabal/download.html
  2. In a terminal:
    $ cd ''Cabal install directory''; ./bootstrap.sh
  3. Edit your path to contain ~/.cabal/bin . This can be achieved by adding
    PATH=$PATH:~/.cabal/bin
    to ~/.profile
  4. Open a new shell (the path variable will only take effect on new shells).
  5. Update cabal
    $ cabal update
  6. Install xmonad
    $ cabal install xmonad

Install dmenu (optional but recommended)

  1. Download and extract dmenu from http://tools.suckless.org/dmenu
  2. $ cd ''dmenu directory''; sudo make install

Updating X11

The version of X11 shipped with Leopard (04/04/09) does not support going fullscreen on xmonad key combinations. I recommend updating X11. It is likely that a Leopard update will eventually make this step unnecessary. Download and install the latest version from macosforge.

Configuring Your .xinitrc to Run XMonad

write:

export USERWM=`which xmonad`
exec /usr/X11/lib/X11/xinit/xinitrc

to ~/.xinitrc

Alternatively, if this doesn't work (because you haven't updated X11): write:

export USERWM=`which xmonad`
exec $USERWM

to ~/.xinitrc

Make sure your PATH variable is set up correctly in ~/.profile. Xmonad and dmenu should be in the path. Anything you want to launch from dmenu should be in the path.

Configuring Your Keyboard

I can't find the meta key (xmonad is unusable without it) in the default configuration. I followed this guide (write

clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
add Mod1 = Meta_L
add Mod2 = Mode_switch

to ~/.Xmodmap) and now the meta key is the left alt.

Further Configuring

  • The menu bar shouldn't get in the way (fullscreen or otherwise, updated or standard X11). The Dock however will, I recommend hiding the Dock or always working in fullscreen mode.
  • You can start X11 (and Xmonad) by running any program that uses X, or by running X11.app. If you run X11.app a default program is started. You can configure this program by running
     $ defaults write org.x.X11 "app_to_run" "gnome-terminal" 
    (replace gnome-terminal with a program of your choice). or
    $ defaults write org.x.X11 "app_to_run" ""
    to have no application run by default.
  • There shouldn't be anything different on OSX about configuring ~/.xmonad/xmonad.hs.

Discussion

  • XMonad and Vimperator (Firefox 3 extension) make a powerful combination on Linux. I cannot achieve this on OSX because the newest X11 version of Firefox I can install is version 2. If anyone has any hints on installing Firefox 3 X11 please share them.
  • It is possible to be a heavy user of OSX and never come across any X11 software. XMonad only works with X11 software- a package manager such as Port is helpful http://www.macports.org/ .