Quantcast
Channel: Shriphani Palakodety » Racket
Viewing all articles
Browse latest Browse all 3

Racket TinyWM

$
0
0

I have been trying to make a Lisp my go-to language for small projects. Racket is a fantastic language and used by many people who are a lot smarter than I am. I have been meaning to learn the Racket FFI and a perfect exercise is to implement TinyWM in it. From the TinyWM webpage:

  1. Move windows interactively with Alt+Button1 drag (left mouse button)
  2. Resize windows interactively with Alt+Button3 drag (right mouse button)
  3. Raise windows with Alt+F1 (not high on usability I know, but I needed a keybinding in there somewhere)
  4. Focus windows with the mouse pointer (X does this on its own)

My OS is Ubuntu 12.04 and I assume that this code will run on Linux. You can check if you have the X11 headers and so on by using this snippet:

Once we've confirmed that everything works, you can run tinywm.rkt . Overall the file is at 100-ish lines but I mostly multiline function calls that in the original source fit into 1 line.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images