Thread View: gnu.epoch.misc
2 messages
2 total messages
Started by Jeff Putnam
Fri, 21 May 1993 14:45
epoch code
Author: Jeff Putnam
Date: Fri, 21 May 1993 14:45
Date: Fri, 21 May 1993 14:45
77 lines
3502 bytes
3502 bytes
The following code is an attempt to have epoch setup screens for me
more or less automagically. For the most part it works, but I
have a couple questions.
1) When I dont set background color in my defaults setup and it only
uses the background color from this code, and when using the automatic
comment-highlight-in-another-color, the comments come out in that other
color over a white background which overwrites the default yellowish
background I select here. Why?
2) The minibuffer and first window created dont seem to check the
*create-screen-alist-hook*. How can I get around this?
3) I've tried a couple things to eliminate the title on the minibuffer
(including in the wm and in epoch), how does one do this?
-- code follows --
(defvar *desired-window-spacing* 100)
(defvar *jefu-normal-background* "LemonChiffon")
(defvar *jefu-normal-foreground* "black")
(defvar *jefu-minibuffer-background* "firebrick4")
(defvar *jefu-normal-foreground* "white")
(defun do-jefu-window-alist-thing (y)
(if (equal (assoc 'title y) "Minibuffer")
(cons (cons 'foreground *jefu-minibuffer-foreground*)
(cons (cons 'background *jefu-minibuffer-background*)
(cons (cons '(geometry . "100x1+300-0") y))))
(cons (cons 'foreground *jefu-normal-foreground*)
(cons (cons 'background *jefu-normal-background*)
(cons (cons 'geometry (format "80x60+%d+0" (locate-screen-x))) y)))))
(push 'do-jefu-window-alist-thing *create-screen-alist-hook*)
(defun locate-screen-x ()
(let ((screen-xs (mapcar 'get-screen-x (screen-list))))
(if (null screen-xs)
nil
(if (= (length screen-xs) 1)
(+ (car screen-xs) *desired-window-spacing*)
(find-spot screen-xs)))))
(defun get-screen-x (x) (car (screen-information x)))
(defun find-spot (x-list)
(let ((max-x (car (epoch::plane-size))))
(setq x-list (sort x-list '<))
(if (< (car (last x-list)) (- max-x *desired-window-spacing*))
(+ (car (last x-list)) *desired-window-spacing*)
(if (> (car x-list) *desired-window-spacing*)
(- (car x-list) *desired-window-spacing*)
(let ((gap (find-largest-gap
(cons 0 (append x-list (list max)))
*desired-window-spacing*)))
(/ (+ (car gap) (cdr gap)) 2))))))
(defun find-largest-gap (l)
(find-largest-gap-1 l (cons (car l) (cadr l)) (- (cadr l) (car l))))
(defun find-largest-gap-1 (l largest-gap-so-far its-size)
(if (< (length l) 2)
largest-gap-so-far
(let ((s (- (cadr l) (car l))))
(if (> s its-size)
(find-largest-gap-1 (cdr l) (cons (car l) (cadr l)) s)
(find-largest-gap-1 (cdr l) largest-gap-so-far its-size)))))
--
jefu <=> Jeff Putnam - New Mexico Tech <=> jefu@nmt.edu
"Daffodils go Ping! and Oink! // They Really are alarming
I'm scared of big geraniums // And I'm sure that Lilac's harming"
(Dr. Bertram X. Fegg)
Re: epoch code
Author: Gary Ward
Date: Tue, 25 May 1993 00:16
Date: Tue, 25 May 1993 00:16
34 lines
2027 bytes
2027 bytes
In article <1993May21.144543.25831@nmt.edu>, jefu@nmt.edu (Jeff Putnam) writes:
>
>
> The following code is an attempt to have epoch setup screens for me
> more or less automagically. For the most part it works, but I
> have a couple questions.
-- Questions I can't answer deleted --
> 3) I've tried a couple things to eliminate the title on the minibuffer
> (including in the wm and in epoch), how does one do this?
>
In general, applications neither know about, nor have any direct
influence over the title bar. This is a window manager function. (The
nifty packages which change the title bar to the current buffer name,
etc, do so by setting a so-called "window manager hint" which the window
manager may or may not honor.) So therefore, if you wish to eliminate
the title bar on the minibuffer, you must do so via the window manager.
Some window managers allow this and some don't. For instance, in twm
(or tvtwm) use:
NoTitle { "Minibuffer" }
For other window managers, check the appropriate man page or docs.
Good luck!
--
+------------------------+---------------------------+
| Gary Ward | Amdahl Corporation |
| gpw10@cd.amdahl.com | 1250 East Arques Avenue |
| Phone : (408)746-8865 | P.O. Box 3470 M/S 142 |
| | Sunnyvale, CA 94088-3470 |
+------------------------+---------------------------+
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads