Skip to content

Instantly share code, notes, and snippets.

@airways
Created March 10, 2011 16:25

Revisions

  1. airways revised this gist Mar 10, 2011. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -37,8 +37,11 @@

    6. X11 terminal colors are black on white by default. To change to white on black, add the following to ~/.Xdefaults:

    XTerm*foreground: white
    XTerm*background: black
    xterm*Background: black
    xterm*Foreground: green
    xterm*cursorColor: LightBlue
    xterm*pointerShape: arrow
    xterm*pointerColor: blue

    7. Start X11.app. `dwm` should start. If it immediately dies then exits, dwm-launch is probably not executable.

  2. airways revised this gist Mar 10, 2011. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -40,22 +40,26 @@
    XTerm*foreground: white
    XTerm*background: black

    5. Start X11.app. `dwm` should start. If it immediately dies then exits, dwm-launch is probably not executable.
    7. Start X11.app. `dwm` should start. If it immediately dies then exits, dwm-launch is probably not executable.

    6. You need to change a few settings
    8. You need to change a few settings
    to make copy/paste between X11 and Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
    under `Input`. Next, enable everything under `Pasteboard`.

    In X11 you copy text by selecting it with the mouse, and you paste
    by pressing `Alt` and clicking the mouse.

    7. If you want to be able to add the tags `3` or `4` to a window, you
    9. If you want to be able to add the tags `3` or `4` to a window, you
    must disable or remap the `Cmd-Shift-3|4` shortcuts for utilising
    the screenshot features of OS X. You can do this under
    `System Preferences -> Keyboard -> Keyboard Shortcuts ->
    Screen Shots`.

    10. I find that the best setup for me is to leave X11 non fullscreen, but hide the dock. This allows X11 and dwm to use almost the entire screen - but leaves the Mac OS menu bar alone.

    11. To get a pile of apps that actually work in X11/dwm, install fink. I've found it to work much better than macports. Using this I have installed and use a number of apps (even FireFox) under X11 - nirvana.

    ## Issues

    * After some time you might not be able to open new terminals. This has
  3. airways revised this gist Mar 10, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@
    add Mod1 = Meta_L
    add Mod2 = Mode_switch

    6. X11 uxterm is launched as a non-login shell, which is undesirable. To launch uxterm as a login shell, add the following to ~/.Xdefaults:
    6. X11 terminal colors are black on white by default. To change to white on black, add the following to ~/.Xdefaults:

    XTerm*foreground: white
    XTerm*background: black
  4. airways revised this gist Mar 10, 2011. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,11 @@
    add Mod1 = Meta_L
    add Mod2 = Mode_switch

    6. X11 uxterm is launched as a non-login shell, which is undesirable. To launch uxterm as a login shell, add the following to ~/.Xdefaults:

    XTerm*foreground: white
    XTerm*background: black

    5. Start X11.app. `dwm` should start. If it immediately dies then exits, dwm-launch is probably not executable.

    6. You need to change a few settings
  5. airways revised this gist Mar 10, 2011. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -35,15 +35,17 @@
    add Mod1 = Meta_L
    add Mod2 = Mode_switch

    5. Start X11.app. `dwm` should start. You need to change a few settings
    5. Start X11.app. `dwm` should start. If it immediately dies then exits, dwm-launch is probably not executable.

    6. You need to change a few settings
    to make copy/paste between X11 and Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
    under `Input`. Next, enable everything under `Pasteboard`.

    In X11 you copy text by selecting it with the mouse, and you paste
    by pressing `Alt` and clicking the mouse.

    6. If you want to be able to add the tags `3` or `4` to a window, you
    7. If you want to be able to add the tags `3` or `4` to a window, you
    must disable or remap the `Cmd-Shift-3|4` shortcuts for utilising
    the screenshot features of OS X. You can do this under
    `System Preferences -> Keyboard -> Keyboard Shortcuts ->
  6. airways revised this gist Mar 10, 2011. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,15 @@
    exec >>~/.xsession-errors 2>&1
    ~/bin/dwm-launch

    5. Create ~/.Xmodmap with the following contents. This will set your meta key to be left-alt.

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

    5. Start X11.app. `dwm` should start. You need to change a few settings
    to make copy/paste between X11 and Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
  7. @liebach liebach revised this gist Mar 25, 2010. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@

    3. Add the following script to $PATH, name it `dwm-launch` and `chmod 755`:

    cd ~
    while true
    do
    xsetroot -name "`date +"%Y-%m-%d %H:%M"`"
    @@ -45,5 +46,3 @@
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution? (Possibly fixed with one of the
    settings under `X11 -> Preferences… -> Security`)

    * New terminals has `/` as working directory. Slightly annoying.
  8. ichverstehe revised this gist Mar 24, 2010. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@
    exec >>~/.xsession-errors 2>&1
    ~/bin/dwm-launch

    5. Start X11.app. `dwm` should start. We need to change a few settings
    5. Start X11.app. `dwm` should start. You need to change a few settings
    to make copy/paste between X11 and Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
    under `Input`. Next, enable everything under `Pasteboard`.
    @@ -36,7 +36,8 @@
    6. If you want to be able to add the tags `3` or `4` to a window, you
    must disable or remap the `Cmd-Shift-3|4` shortcuts for utilising
    the screenshot features of OS X. You can do this under
    `System Preferences -> Keyboard -> Keyboard Shortcuts -> Screen Shots`.
    `System Preferences -> Keyboard -> Keyboard Shortcuts ->
    Screen Shots`.

    ## Issues

  9. ichverstehe revised this gist Mar 24, 2010. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -36,8 +36,7 @@
    6. If you want to be able to add the tags `3` or `4` to a window, you
    must disable or remap the `Cmd-Shift-3|4` shortcuts for utilising
    the screenshot features of OS X. You can do this under
    `System Preferences -> Keyboard -> Keyboard Shortcuts ->
    Screen Shots`.
    `System Preferences -> Keyboard -> Keyboard Shortcuts -> Screen Shots`.

    ## Issues

  10. ichverstehe revised this gist Mar 24, 2010. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -33,10 +33,17 @@
    In X11 you copy text by selecting it with the mouse, and you paste
    by pressing `Alt` and clicking the mouse.

    6. If you want to be able to add the tags `3` or `4` to a window, you
    must disable or remap the `Cmd-Shift-3|4` shortcuts for utilising
    the screenshot features of OS X. You can do this under
    `System Preferences -> Keyboard -> Keyboard Shortcuts ->
    Screen Shots`.

    ## Issues

    * After some time you might not be able to open new terminals. This has
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution?
    Do you know a permanent solution? (Possibly fixed with one of the
    settings under `X11 -> Preferences… -> Security`)

    * New terminals has `/` as working directory. Slightly annoying.
  11. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,8 @@
    2. Install `dwm`. You have to customize `config.h` a bit:

    1. Replace `{ MODKEY|ShiftMask, XK_q, quit, {0} },` with `{ MODKEY|ControlMask, XK_q, quit, {0} },` to avoid colliding with the Log Out shortcut in the Apple menu.
    2. Replace `static const char *termcmd[] = { "uxterm", NULL };` with `static const char *termcmd[] = { "uxterm -e 'cd $HOME && $SHELL'", NULL };`, otherwise new terminals will have `/` as default working directory.

    If you install `dwm` from Homebrew, `brew install dwm`, this is done automatically.

    3. Add the following script to $PATH, name it `dwm-launch` and `chmod 755`:

    @@ -36,4 +37,6 @@

    * After some time you might not be able to open new terminals. This has
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution?
    Do you know a permanent solution?

    * New terminals has `/` as working directory. Slightly annoying.
  12. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@

    2. Install `dwm`. You have to customize `config.h` a bit:

    1. Replace `{ MODKEY|ShiftMask, XK_q, quit, {0} },` with `{ MODKEY|ControlMask, XK_q, quit, {0} },`
    1. Replace `{ MODKEY|ShiftMask, XK_q, quit, {0} },` with `{ MODKEY|ControlMask, XK_q, quit, {0} },` to avoid colliding with the Log Out shortcut in the Apple menu.
    2. Replace `static const char *termcmd[] = { "uxterm", NULL };` with `static const char *termcmd[] = { "uxterm -e 'cd $HOME && $SHELL'", NULL };`, otherwise new terminals will have `/` as default working directory.

    3. Add the following script to $PATH, name it `dwm-launch` and `chmod 755`:
  13. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,10 @@

    1. Install X11.app (it's on the OS X install disk or something.)

    2. Install `dwm`. Either with Homebrew, `brew install dwm`, or from source.
    2. Install `dwm`. You have to customize `config.h` a bit:

    1. Replace `{ MODKEY|ShiftMask, XK_q, quit, {0} },` with `{ MODKEY|ControlMask, XK_q, quit, {0} },`
    2. Replace `static const char *termcmd[] = { "uxterm", NULL };` with `static const char *termcmd[] = { "uxterm -e 'cd $HOME && $SHELL'", NULL };`, otherwise new terminals will have `/` as default working directory.

    3. Add the following script to $PATH, name it `dwm-launch` and `chmod 755`:

    @@ -33,7 +36,4 @@

    * After some time you might not be able to open new terminals. This has
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution?

    * When you start a new terminal, the working directory is `/`. Slightly
    annoying.
    Do you know a permanent solution?
  14. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@
    ~/bin/dwm-launch

    5. Start X11.app. `dwm` should start. We need to change a few settings
    to make copy/paste between X11 <-> Aqua work. Go to
    to make copy/paste between X11 and Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
    under `Input`. Next, enable everything under `Pasteboard`.

  15. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -35,5 +35,5 @@
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution?

    * When you start a new terminal, the working directory is /. Slightly
    * When you start a new terminal, the working directory is `/`. Slightly
    annoying.
  16. ichverstehe revised this gist Mar 11, 2010. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions .xinitrc
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    $PATH=$PATH:/usr/local/bin
    xsetroot -solid '#4a525a'
    xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'
    exec >>~/.xsession-errors 2>&1
    ~/bin/dwm-launch
  17. ichverstehe revised this gist Mar 11, 2010. 3 changed files with 39 additions and 11 deletions.
    5 changes: 0 additions & 5 deletions .Xdefaults
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    xterm*charClass: 33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48
    xterm*background: black
    xterm*foreground: white
    xterm*cursorColor: white
    xterm*font: -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*
    39 changes: 39 additions & 0 deletions DWM-ON-OS-X.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    # Installing and configuring dwm on OS X

    1. Install X11.app (it's on the OS X install disk or something.)

    2. Install `dwm`. Either with Homebrew, `brew install dwm`, or from source.

    3. Add the following script to $PATH, name it `dwm-launch` and `chmod 755`:

    while true
    do
    xsetroot -name "`date +"%Y-%m-%d %H:%M"`"
    sleep 5
    done &
    exec /usr/local/bin/dwm

    4. Add the following to `~/.xinitrc`:

    $PATH=$PATH:/usr/local/bin
    xsetroot -solid '#4a525a'
    xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'
    exec >>~/.xsession-errors 2>&1
    ~/bin/dwm-launch

    5. Start X11.app. `dwm` should start. We need to change a few settings
    to make copy/paste between X11 <-> Aqua work. Go to
    `X11 -> Preferences...` and enable `Emulate three button mouse`
    under `Input`. Next, enable everything under `Pasteboard`.

    In X11 you copy text by selecting it with the mouse, and you paste
    by pressing `Alt` and clicking the mouse.

    ## Issues

    * After some time you might not be able to open new terminals. This has
    something to do with permissions, and can be fixed with `xhost +`.
    Do you know a permanent solution?

    * When you start a new terminal, the working directory is /. Slightly
    annoying.
    6 changes: 0 additions & 6 deletions dwm-launch
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    while true
    do
    xsetroot -name "`date +"%Y-%m-%d %H:%M"`"
    sleep 5
    done &
    exec /usr/local/bin/dwm
  18. ichverstehe created this gist Feb 22, 2010.
    5 changes: 5 additions & 0 deletions .Xdefaults
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    xterm*charClass: 33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48
    xterm*background: black
    xterm*foreground: white
    xterm*cursorColor: white
    xterm*font: -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*
    5 changes: 5 additions & 0 deletions .xinitrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    $PATH=$PATH:/usr/local/bin
    xsetroot -solid '#4a525a'
    xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'
    exec >>~/.xsession-errors 2>&1
    ~/bin/dwm-launch
    6 changes: 6 additions & 0 deletions dwm-launch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    while true
    do
    xsetroot -name "`date +"%Y-%m-%d %H:%M"`"
    sleep 5
    done &
    exec /usr/local/bin/dwm