Re: new command 'display-window-position'?

Am Sat, 26 Dec 2009 16:06:49 +0900 (JST)
schrieb Teika Kazura <teika lavabit com>:

> Hi. How will you like a new command 'display-window-position'?
> It displays the top-left and bottom-right coords, and the size.
> I think it'll be useful. I sometimes wanted to know them when I set
> window rules in the configurator. Because these infos are fundamental,
> there should be the way for users to know, implemented within Sawfish,
> no?

Indeed this function is useful for using to tweak window rules. As an
old user of sawfish I wrote such a function in 2000 as I missed it for
matched windows (now window rules). Here it is:

(defun display-window-position (w)
  "this is written by Gerhard Kirchmann
   and displays window-position"
  (interactive "%W")
  (setq var1 (car (window-position w)))
  (setq var2 (cdr (window-position w)))
  (setq var3 (car (window-dimensions w)))
  (setq var4 (cdr (window-dimensions w)))
  (display-message (format nil "Window %s\nposition:\n%d pixels from
the left h$ (make-timer (lambda() (display-message nil)) 7))

BTW: sawfish did a long time not function for me, but since a couple of
years I'm glad that it's alive again.

Gerhard Kirchmann

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]