sawfish stuff

I use the 'sawfish' window manager for X Windows. I like it because it's got a lot of nice features built in, and because it can be extended very eaily with LISP code.

I wrote a theme for it, called blueberry. To install the blueberry theme so that you can use it, download the file blueberry.tar.gz from the link above, and place it in your .sawfish/themes directory. The blueberry theme is somewhat interesting from a code standpoint in that it features a clock in the titlebar of every window; the clock only refreshes in the window that currently has the input focus.

I also use the zephyr Instant Messaging protocol, with the ' zwgc' client (as well as a zephyr client called owl). zwgc pops up 'windograms' for incoming zephyrs. I use code in my .Xresources file to set the initial position of incoming windowgrams. I use some code in my .sawfishrc file to make windowgrams more than 300 pixels to the right of the left edge of the screen creep up the screen at a rate of one pixel per second, getting deleted when they move past the top of the screen. This helps keep too many windowgrams from accumulating and bogging down my computer.

The code I use follows:

(require 'sawfish.wm.commands.move-resize)
(require 'timers)

(define fall-interval 1000)
                                                                                
(define (move-or-kill-wg w)
  (if (= (window-class w) "Zwgc")
      (if (< 300 (car (window-position w)))
          (if (<  (cdr (window-position w))
                   0)
              (delete-window w)
            (move-window-to w
                            (car (window-position w))
                            (- (cdr (window-position w)) 1))))))
                                                                                
(define wgfall
  (lambda (timer)
        (map-windows move-or-kill-wg)
        (set-timer timer)))
                                                                                
(make-timer wgfall 0 fall-interval)

(index)