Skip to content

Instantly share code, notes, and snippets.

@angel333
Forked from vangberg/DWM-ON-OS-X.md
Last active April 11, 2024 16:14
Show Gist options
  • Save angel333/5198896 to your computer and use it in GitHub Desktop.
Save angel333/5198896 to your computer and use it in GitHub Desktop.
Updated for .xinitrc.d and $USERWM, simplified

Installing and configuring dwm on OS X (tested on Mountain Lion, Mavericks)

  1. Install XQuartz.

  2. Install dwm using Homebrew (or whatever):

    brew install dwm
    
  3. Create a xinitrc.d script for dwm:

    mkdir ~/.xinitrc.d
    echo "USERWM=/usr/local/bin/dwm" > ~/.xinitrc.d/00-dwm.sh
    chmod +x ~/.xinitrc.d/*
    
  4. Run XQuartz, dwm should start.


It might be useful to tweak some XQuartz settings (just press ⌘,) like full screen, clipboard, etc.

@angel333
Copy link
Author

Do you still have ~/.xinitrc? If so, try to remove it..

//edit: I've noticed that you try to run it manually - from xterm. That's probably not gonna work because you already have quartz-wm (the built-in wm) running - which is likely the reason why dwm is complaining. Just try the steps above and make sure you don't have a .xinitrc. It worked for me right now.

@andrew678122
Copy link

Hey angel333, I want to thank you for this! I've been trying to get twm(don't ask why) running on my iMac and your suggestion did it! I now have an iMac that at the click of the X icon, looks like it's 30 years old! I love it!

@afh
Copy link

afh commented May 2, 2014

Very helpful, thanks! 👍

@aronj
Copy link

aronj commented May 9, 2014

You can also hide the os x top bar by editing xquartz's plist.
sudo nano /Applications/Utilities/XQuartz.app/Contents/Info.plist
and add among the other keys

<key>LSUIPresentationMode</key>
<string>AllSuppressed</string>

However, the space underneath the hidden bar is unusable. Using Meta-b retracts this space further. One step closer to fullscreen!

@twe4ked
Copy link

twe4ked commented Apr 9, 2015

I had to run the following to get the meta key working:

touch ~/.xmodmaprc
xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L' ~/.xmodmaprc

Thanks for the simplified instructions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment