Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-08-06

Using the Factory Window Manager on Mac OS X

Factory is an X11 window manager written in Factor by Eduardo Cavazos. Although best used in Linux, it can also be run using the X11.app in Mac OS X.

First you need to build Factor using the X11 backend rather than the standard Mac OS X backend. This can be done with the latest darcs code using these steps:

cd Factor
make macosx-x86 X11=1
./Factor.app/Contents/MacOS/factor -i=boot.x86.32.image -ui-backend=x11

The X11.app program usually runs a Quartz based window manager. You can run any window manager by providing a .xinitrc file in your home directory. Copy /private/etc/X11/xinit/xinitrc to ~/.xinitrc:

cp /private/etc/X11/xinit/xinitrc ~/.xinitrc

Edit it so the last line which runs the window manager is removed, and remove the '&' from the end of the line that invokes 'xterm':

# Change this
xterm &

# to just
xterm

#Delete this line
exec quartz-wm

Now when you run X11.app you'll find an ugly looking xterm window starting with no window manager decorations. From within this xterm, run the X11 Factor you built, and start Factory:

cd ~/x11-factor/Factor
open Factor.app
USE: factory
":0" start-factory

This starts a UI instance of Factor, loads the Factory code, and starts the window manager on the given display. You can also run it as a terminal application rather than the UI:

cd ~/x11-factor/Factor
./Factor.app/Contents/MacOS/factor -run=listener
USE: factory
":0" start-factory

Either way you run it, you'll see the X11 windows instantly get the Factory decorations. The key bound to bring up the Factory menu is F12 which by default on my Macbook does something else. This can be configured, along with the menu, by copying two files and editing them to do what you want:

cp ~/x11-factor/Factor/extra/factory/factory-rc ~/.factory-rc
cp ~/x11-factor/Factory/extra/factory/factory-menus ~/.factory-menus

In ~/.factory-rc, change references to the F12 key to F8. Now when you start Factory, F8 will bring the menu up for running applications.

With Factory loaded this way you can modify the window manager code on the fly and the effects occur immediately.

Tags


This site is accessable over tor as hidden service 6vp5u25g4izec5c37wv52skvecikld6kysvsivnl6sdg6q7wy25lixad.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-61/


Tags

Archives
Links