Installing on OSX
Set nwm as the X11 window manager:
- Edit ~/.xinitrc to: "~/nwm/nwm.sh" (assuming that's where nwm is).
- Check/fix the paths in nwm.sh and start XQartz from Applications / Utilities.
- Check the settings under X11 / Preferences (these are just my recommendations)
- Emulate three button mouse
- Follow system keyboard layout
- Enable key equivalents under X11
- Option keys send Alt_L and Alt_R
- Click through inactive windows
- Focus follows mouse
- Focus on new windows
Fix the key bindings:
Unlike on other OS's, Apple has a ton of stuff bound to the Command (infinite loop thingy) key and removing those bindings is basically impossible (e.g. Command + Shift + q is a system key combination that cannot be altered). More discussion: http://www.emacswiki.org/emacs/MetaKeyProblems
To work around this, map something else to Mod4, the default modifier key used by nwm. You can either edit the baseModifier variable in nwm-user-sample.js, or:
Run xmodmap, which will show what physical keys are bound to which modifier keys. nwm uses Mod4 by default.
clear Mod1 clear Mod4 keycode 66 = Alt_L keycode 69 = Alt_R add Mod1 = Alt_R add Mod4 = Alt_L
Here, I first cleared Mod1 (which by default had both Alt keys mapped to it, then changed Mod4 to left Alt and Mod1 to right Alt). You can run xev to interactively find out what keycodes are associated with what keys.
to change the keybindings (or close XQuartz and restart it). Alt + Shift + Enter now starts a new xterm instead of Meta + Shift + Enter - see the full keybindings further below.
Some extras (these just make the terminal a bit better):
~/.bashrc (color ls output, better prompt, import .profile):
alias ls="ls -G" export PS1="[\w]$ " source ~/.profile cd ~
XTerm*foreground: gray XTerm*background: black