finagle the fenestra
So I have a working laptop again, but the touchpad has frankly stupid “touch then drag” behaviour that makes window placement an absolute pain. In my lunch hour yesterday, lacking the internet access I needed to address the Clojure issue that I had originally holed up in the Barbican library to work on (couldn’t get a 3G or a wireless connection) I decided to look again at last year’s ‘throw-window’ sawfish hackery and have turned it into something slightly more brutal: now instead of slinging the focussed window right to the screen edge it only moves it to butt up against the next window on the screen (more or less).
The code is at https://github.com/telent/dotfiles/blob/master/.sawfish/lisp/throw-window.jl (i.e. it hasn’t moved) and there are a couple of other changes
- it’s now a module, which required some experimentation as the documentation is a bit more abstract and less concrete than I’d like. Note that
- The entire file is now inside the body of the
- The symbols in the
exportclause can now be referenced, as written, in (what for want of a keener understanding of how it actually works I am calling) the global environment. By which I mean to say, we call the function from outside the module as
- the command names didn’t need exporting but are nevertheless globally available anyway. Don’t ask me why.
do-movehas been enhanced with a call to
window-frame-offsetso that the pointer is warped to where we actually were relative to the window contents instead of being off by the size of the titlebar/left border.