Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: db3545413d
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (38 sloc) 2.011 kB

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)
    • Input:
      • Emulate three button mouse
      • Follow system keyboard layout
      • Enable key equivalents under X11
      • Option keys send Alt_L and Alt_R
    • Windows:
      • 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.

Edit ~/.xmodmap:

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.

Finally, run

xmodmap ~/.xmodmap

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 ~

~/.Xresources (colors):

XTerm*foreground: gray
XTerm*background: black
Jump to Line
Something went wrong with that request. Please try again.