; -*- sawfish -*- ;Time-stamp: <01/09/14 12:06:27 friedel> ;; by Friedrich Delgado Friedrichs ;Commands to position windows in the corners or at the edges of the ;screen ;; Installation: Put this into ~/.sawfish/lisp/friedel and then ;; (require 'friedel.corner). ;;This is quite different from the corner package by Kai Großjohann ;;(ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/sawmill/) since i really ;;want to put windows into the *very* corner of the screen, no matter ;;what they obstruct. So this one is much, much simpler (which is ;;good), and much less abstract (which is argueable). (defun corner-window-position (w x y) (window-put w 'position x y) (move-window-to w x y) (call-window-hook 'after-move-hook w '(()))) (defun corner-window-left-upper (w) "Position window in the upper left corner" (interactive "%W") (corner-window-position w 0 0)) (defun corner-window-right-upper (w) "Position window in the upper right corner" (interactive "%W") (let ((width (car (window-frame-dimensions w)))) (corner-window-position w (- (screen-width) width) 0))) (defun corner-window-right-lower (w) "Position window in the lower right corner" (interactive "%W") (let* ((wds (window-frame-dimensions w)) (width (car wds)) (height (cdr wds))) (corner-window-position w (- (screen-width) width) (- (screen-height) height)))) (defun corner-window-left-lower (w) "Position window in lower left corner" (interactive "%W") (let ((height (cdr (window-frame-dimensions w)))) (corner-window-position w 0 (- (screen-height) height)))) (provide 'friedel.corner)