tiling window manager in node.js


A pure js xorg window manager, that I wrote on the plane.

install Xephyr to run another display inside your current window manager.

then start everything with the DISPLAY envar set, so it will run in the correct display.

Xephyr -br :1 &
DISPLAY=:1 xterm &
DISPLAY=:1 node tiles.js

first, install globally npm install -g tiles

my ~/.xinit looks like this:

setxkbmap -layout dvorak
export TERM='xterm -fn=7x13 -rv'
exec node /home/dominic/c/tiles/tiles.js > tiles.log

On my setup, I login on a bare terminal, and then start my window manager with startx. If you use ubuntu or something with a shishi login screen you can add the following to /usr/share/xsessions

[Desktop Entry]
Comment=This session starts tiles

(that is what nwm suggests, so that will probably work)

tiles uses rc to manage it's configuration. see ./config.js for default settings. Currently only animation time and framerate are configurable. TODO: keyboard commands.

This was easy becase of x11, and what I had learnt hacking on nwm I would also never have done this if gb and eb hadn't helped me install archlinux (and escape OSX)

  • focus window on mouseover (currently chrome breaks this)
  • multiple workspaces
  • keyboard shortcuts
  • refactor out xorg.js once I get more familiar with it.