🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2041

Re: disabling auto placement

#2041
From: derge Gillmer J. Derge
Date: Tue, 09 Apr 1991 12:27
84 lines
3698 bytes
In article <9104082359.AA01595@hwcae.cfsat.honeywell.com>,
rand@HWCAE.CFSAT.HONEYWELL.COM (Douglas K. Rand) writes:
|>These are two little minor inconviencies that are starting to wear me
|>down, and I haven't figured out either of them.
|>
|>The first is that I want GWM to place my Epoch windows for me. Be it
|>intreactivly, through a hard coded default, or via a strange lisp
|>function. I can't seem to dissuade Epoch from placing the window from
|>the geometry specification. Anybody got any ideas?
|>
|>The other is the size of the window when I start Epoch. My geometry
|>specification is:
|>	Emacs*screen.geometry:	100x58+1+221
|>
|>Places the window in the "correct" place, but the size is too small.
|>It starts out being 96x56, and I can't figure out why.
|>
|>Thanks in advance....
|>--
|>Douglas Keenan Rand                Honeywell -- Air Transport Systems
Division
|>Phone: +1 602 436 2814               US Snail: P.O. Box 21111 Phoenix
AZ 85036
|>Internet: @cim-vax.honeywell.com:rand@hwcae.cfsat.honeywell.com
|>   -or-   rand@ssdc.honeywell.com
|>UUCP: ...!uunet!asuvax!apciphx!hwcae!rand
                      
	A while back, I wrote some elisp to do this for me.  It will place
successive windows slightly below and to the right of the others, resulting in
the following type of effect:

	--------------------------------
	|Window 1
	|  ---------------------------------
	|  |Window 2
	|  |  ----------------------------------
	|  |  |Window 3...
	|  |  |

	The initial upper left corner, the offset to use for each new screen,
and the geometry to use for the new screens are in variables, so you can
control
them as you wish.  I make no claims to being the world's best elisp programmer,
but this works for me, and you, or anyone else, are certainly welcome to it.

	This code is somewhat dependent on the assumption that you will delete
the windows in order (Window 3, window 2, etc.).  If you do not, the code will
work, but may place the window on top of another.  Hope this does what
you need.

		Gill Derge
		<derge@crd.ge.com>

-----------------Cut here------------------
;;; Code to automatically position a new screen based on
;;; The number of active screens
;;; By Gill Derge 1/91

(defvar screen-x-ref 250
  "*Upper left corner of initial screen location.")
(defvar screen-y-ref 0
  "*Upper left corner of initial screen location.")
(defvar screen-x-delta 26
  "*Space between screens.")
(defvar screen-y-delta 21
  "*Space between screens.")

(defvar other-screen-size "80x30"
  "*Geometry for other screens.")

(defun other-screen-goemetry ()
  (let ((num-screens (length (screen-list t))))
    (concat other-screen-size "+"
	    (+ screen-x-ref (* screen-x-delta num-screens))
	    "+"
	    (+ screen-y-ref (* screen-y-delta num-screens)))))

(defun other-screen-goemetry-alist (alist)
  (cons (cons 'geometry
	      (other-screen-goemetry))
	alist))

(setq *create-screen-alist-hook* 'other-screen-goemetry-alist)
-----------------And then cut here---------------
Technical Details
Message-ID: <18354@crdgw1.crd.ge.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!crdgw1!paris!derge
References: <9104082359.AA01595@hwcae.cfsat.honeywell.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,2c6c4ff5f120f5e9
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-04-09 12:45:18 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!crdgw1!paris!derge
From: derge@parisderge@crd.ge.com (Gillmer J. Derge)
Newsgroups: gnu.epoch.misc
Subject: Re: disabling auto placement
Message-ID: <18354@crdgw1.crd.ge.com>
Date: 9 Apr 91 12:27:02 GMT
References: <9104082359.AA01595@hwcae.cfsat.honeywell.com>
Sender: news@crdgw1.crd.ge.com
Reply-To: derge@crd.ge.com
Distribution: gnu
Organization: GE Corporate R&D Center, Schenectady, NY
Lines: 84