all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* different background colours in different emacs windows.
@ 2011-03-25 20:53 Filippo A. Salustri
  2011-03-25 22:40 ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Filippo A. Salustri @ 2011-03-25 20:53 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

Hi,
I was wondering: can one set the background-color of the active window to be
different from that of other, inactive windows?
I've thought that adding to default-frame-alist something like
(background-color . ("white" "black")) would have worked, but aquamacs just
goes away (never opens a frame) if I do that.

I'm running aquamacs 2.2 on OSX 10.6.6.

Anyone got any advice?
Cheers.
Fil Salustri

-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

[-- Attachment #2: Type: text/html, Size: 931 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-25 20:53 different background colours in different emacs windows Filippo A. Salustri
@ 2011-03-25 22:40 ` Peter Dyballa
  2011-03-25 23:52   ` Filippo A. Salustri
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2011-03-25 22:40 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: help-gnu-emacs


Am 25.03.2011 um 21:53 schrieb Filippo A. Salustri:

> Anyone got any advice?

The mode-line can reflect the state of activeness.

--
Greetings

   Pete

Computers are good at following instructions, but not at reading your  
mind.
	- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
       [not found] <mailman.13.1301091024.10079.help-gnu-emacs@gnu.org>
@ 2011-03-25 23:52 ` Tim X
  0 siblings, 0 replies; 11+ messages in thread
From: Tim X @ 2011-03-25 23:52 UTC (permalink / raw)
  To: help-gnu-emacs

"Filippo A. Salustri" <salustri@ryerson.ca> writes:

> Hi,
> I was wondering: can one set the background-color of the active window to be
> different from that of other, inactive windows?
> I've thought that adding to default-frame-alist something like
> (background-color . ("white" "black")) would have worked, but aquamacs just
> goes away (never opens a frame) if I do that.
>
> I'm running aquamacs 2.2 on OSX 10.6.6.
>
> Anyone got any advice?
> Cheers.
> Fil Salustri

I don't think this can be done - at least not easily. I think more recent
versions of emacs do support the ability to set faces on a per buffer
basis, but as far as I know, there is no mechanism to change a face
based on changes in the buffer status i.e. active v inactive. I guess
you would need to find an appropriate hook that runs when the buffer
changes state and then add some code which sets the default background.
Alternatively, jit-lock-register may be worth looking at. I suspect the
problem will be that for efficiency reasons, when emacs is switching
buffers, it will not do any font-locking on the buffer your switching
from. However, this is all just a guess and may be completely wrong.

I can see how such a feature may be useful - maybe worth putting in a
feature request/whishlist item to the emacs devels

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-25 22:40 ` Peter Dyballa
@ 2011-03-25 23:52   ` Filippo A. Salustri
  2011-03-26 10:02     ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Filippo A. Salustri @ 2011-03-25 23:52 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

Yup. I've diddled the mode-line already.  However, I have a big screen, and
I cover most of it with emacs.  I find that the mode-line is relatively
small in that case, and even if I set it to  a rather bright colour, I often
can't tell which window is active.
I can understand the mode-line being enough for an 80x24-ish display, but I
run emacs at 160x60.

Cheers.
Fil

On 25 March 2011 18:40, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 25.03.2011 um 21:53 schrieb Filippo A. Salustri:
>
>  Anyone got any advice?
>>
>
> The mode-line can reflect the state of activeness.
>
> --
> Greetings
>
>  Pete
>
> Computers are good at following instructions, but not at reading your mind.
>        - D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9
>
>


-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

[-- Attachment #2: Type: text/html, Size: 1639 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-25 23:52   ` Filippo A. Salustri
@ 2011-03-26 10:02     ` Peter Dyballa
  2011-03-26 11:22       ` Filippo A. Salustri
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2011-03-26 10:02 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: help-gnu-emacs


Am 26.03.2011 um 00:52 schrieb Filippo A. Salustri:

> Yup. I've diddled the mode-line already.  However, I have a big  
> screen, and
> I cover most of it with emacs.  I find that the mode-line is  
> relatively
> small in that case, and even if I set it to  a rather bright colour,  
> I often
> can't tell which window is active.
> I can understand the mode-line being enough for an 80x24-ish  
> display, but I
> run emacs at 160x60.


Play a bit with this customisation:

  '(mode-line ((t (:background "magenta" :foreground "black" :height  
1.5 :family "bauhaus 93"))))
  '(mode-line-inactive ((t (:inherit mode-line :background  
"PaleTurquoise1" :foreground "grey20" :box (:line-width -1 :color  
"grey75") :height 0.875 :weight light :family "times unicode"))))

In GNU Emacs 24.0.50 I've seen a variable mode-line-in-non-selected- 
windows. It gives you easy access to customising the `mode-line' and  
`mode-line-inactive' faces. My example is just something to play with.  
And see the effect.

--
Greetings

   Pete

What is this talk of 'release?' Klingons do not make software  
'releases.'  Our software 'escapes,' leaving a bloody trail of  
designers and quality assurance people in its wake.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 10:02     ` Peter Dyballa
@ 2011-03-26 11:22       ` Filippo A. Salustri
  2011-03-26 11:34         ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Filippo A. Salustri @ 2011-03-26 11:22 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

Ah.  The height of the mode-line.  Hadn't thought of that.  Thanks for the
tip.
Cheers.
Fil

On 26 March 2011 06:02, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 26.03.2011 um 00:52 schrieb Filippo A. Salustri:
>
>
>  Yup. I've diddled the mode-line already.  However, I have a big screen,
>> and
>> I cover most of it with emacs.  I find that the mode-line is relatively
>> small in that case, and even if I set it to  a rather bright colour, I
>> often
>> can't tell which window is active.
>> I can understand the mode-line being enough for an 80x24-ish display, but
>> I
>> run emacs at 160x60.
>>
>
>
> Play a bit with this customisation:
>
>  '(mode-line ((t (:background "magenta" :foreground "black" :height 1.5
> :family "bauhaus 93"))))
>  '(mode-line-inactive ((t (:inherit mode-line :background "PaleTurquoise1"
> :foreground "grey20" :box (:line-width -1 :color "grey75") :height 0.875
> :weight light :family "times unicode"))))
>
> In GNU Emacs 24.0.50 I've seen a variable
> mode-line-in-non-selected-windows. It gives you easy access to customising
> the `mode-line' and `mode-line-inactive' faces. My example is just something
> to play with. And see the effect.
>
> --
> Greetings
>
>  Pete
>
> What is this talk of 'release?' Klingons do not make software 'releases.'
>  Our software 'escapes,' leaving a bloody trail of designers and quality
> assurance people in its wake.
>
>


-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

[-- Attachment #2: Type: text/html, Size: 2393 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 11:22       ` Filippo A. Salustri
@ 2011-03-26 11:34         ` Peter Dyballa
  2011-03-26 11:46           ` Filippo A. Salustri
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2011-03-26 11:34 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: help-gnu-emacs


Am 26.03.2011 um 12:22 schrieb Filippo A. Salustri:

> The height of the mode-line


Not only that! The "bauhaus 93" font is a heavy sans-serif font,  
suited for punch-lines. The inactive mode-line can have something very  
thin (American Typewriter, Latin Modern Light, Iwona Light) – and  
*with* serifs. It's also possible to set the mode-line's text contents  
inside a box. This box' colour can be chosen (the width presumingly  
not). Or reversing the mode-line...

--
Greetings

   Pete

It isn't pollution that's harming the environment. It's the impurities  
in our air and water that are doing it.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 11:34         ` Peter Dyballa
@ 2011-03-26 11:46           ` Filippo A. Salustri
  2011-03-26 16:48             ` Peter Dyballa
  0 siblings, 1 reply; 11+ messages in thread
From: Filippo A. Salustri @ 2011-03-26 11:46 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

Yah, I know bauhaus 93.  Trick is, it's nearly illegible (to me).  Still,
get your point.
I'll root around for some decent font.
Thanks again.
Cheers.
Fil

On 26 March 2011 07:34, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 26.03.2011 um 12:22 schrieb Filippo A. Salustri:
>
>
>  The height of the mode-line
>>
>
>
> Not only that! The "bauhaus 93" font is a heavy sans-serif font, suited for
> punch-lines. The inactive mode-line can have something very thin (American
> Typewriter, Latin Modern Light, Iwona Light) – and *with* serifs. It's also
> possible to set the mode-line's text contents inside a box. This box' colour
> can be chosen (the width presumingly not). Or reversing the mode-line...
>
> --
> Greetings
>
>  Pete
>
> It isn't pollution that's harming the environment. It's the impurities in
> our air and water that are doing it.
>
>


-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

[-- Attachment #2: Type: text/html, Size: 1771 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 11:46           ` Filippo A. Salustri
@ 2011-03-26 16:48             ` Peter Dyballa
  2011-03-26 23:01               ` Filippo A. Salustri
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2011-03-26 16:48 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: help-gnu-emacs


Am 26.03.2011 um 12:46 schrieb Filippo A. Salustri:

> it's nearly illegible (to me)


Then use a vector font! LibXft and libfreetype can produce good  
looking raster output for GNU Emacs. Good looking fonts, particularly  
heavy ones, can be found here: http://arkandis.tuxfamily.org/adffonts.html 
.

--
Greetings

   Pete

If it dies, it's biology.  If it blows up, it's chemistry. If it  
doesn't work, it's physics.
			– University washroom sgraffito




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 16:48             ` Peter Dyballa
@ 2011-03-26 23:01               ` Filippo A. Salustri
  2011-03-27  5:56                 ` Alan E. Davis
  0 siblings, 1 reply; 11+ messages in thread
From: Filippo A. Salustri @ 2011-03-26 23:01 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

I appreciate the advice, but I didn't mean it didn't render well.  I love
the way my mac renders fonts.  I just mean the /design/ of bauhaus throws me
for a loop.
Cheers.
Fil

On 26 March 2011 12:48, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 26.03.2011 um 12:46 schrieb Filippo A. Salustri:
>
>
>  it's nearly illegible (to me)
>>
>
>
> Then use a vector font! LibXft and libfreetype can produce good looking
> raster output for GNU Emacs. Good looking fonts, particularly heavy ones,
> can be found here: http://arkandis.tuxfamily.org/adffonts.html.
>
> --
> Greetings
>
>  Pete
>
> If it dies, it's biology.  If it blows up, it's chemistry. If it doesn't
> work, it's physics.
>                        – University washroom sgraffito
>
>


-- 
Filippo A. Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/979-5000 ext 7749
Fax: 416/979-5265
Email: salustri@ryerson.ca
http://deseng.ryerson.ca/~fil/

[-- Attachment #2: Type: text/html, Size: 1709 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: different background colours in different emacs windows.
  2011-03-26 23:01               ` Filippo A. Salustri
@ 2011-03-27  5:56                 ` Alan E. Davis
  0 siblings, 0 replies; 11+ messages in thread
From: Alan E. Davis @ 2011-03-27  5:56 UTC (permalink / raw)
  To: Filippo A. Salustri; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]

This doesn't do what you want with the modeline.  In fact, it is not
perfect, and I do not have the experience to fix it, but it was given to me
in slightly different form by someone on this list or another emacs list. I
would be pleased if someone else is able to make it work right.

There has been no serious problem with this.  The one botheration is that
one has to call up two frames before subsequent frames start cycling through
colors.

First, the code, with apologies to Kai Grossjohann, who provided this as
untested:

;;=========================================================
;; Cycling frame colors
;; Kai.Grossjohann
;; Newsgroups: gnu.emacs.help, 5 Aug 2002
;;———————————-
(defun my-next-bg-color (frame)
(let ((x (assq ‘background-color default-frame-alist)))
(setq default-frame-alist (delq x default-frame-alist))
(add-to-list ‘default-frame-alist
(cons ‘background-color
(cond ((equal (cdr x) “blue”)
“black”)
((equal (cdr x) “black”)
“dark blue”)
((equal (cdr x) “dark blue”)
“saddle brown”)
((equal (cdr x) “saddle brown”)
“blue1″)
((equal (cdr x) “blue1″)
“dark olive green”)
((equal (cdr x) “dark olive green”)
“maroon”)
((equal (cdr x) “maroon”)
“blue violet”)
((equal (cdr x) “blue violet”)
“MediumPurple”)
((equal (cdr x) “MediumPurple”)
“RoyalBlue3″)
((equal (cdr x) “RoyalBlue3″)
“DeepSkyBlue4″)
((equal (cdr x) “DeepSkyBlue4″)
“blue”)
(t “black”))))))

(add-hook ‘after-make-frame-functions ‘my-next-bg-color)
;;==============================================================


I am not sure how important the following is, but I initialized the frame
with a black background before loading the above code.

;;=========================
(setq default-frame-alist
      '((width . 87)
    (height . 40)
    (foreground-color . "light green")
    (background-color . "black")
    (tool-bar-lines . 1)
    (menu-bar-lines . 1)
    (font . "Monospace-9")
    (cursor-color . "red")
    (mouse-color . "cyan")
    (right . 150)
    (top . 24)
    (user-position . t)
    )
      )
;;=============================

I tend to open WAY too many frames at once.  This helps to identify them.

Alan Davis

[-- Attachment #2: Type: text/html, Size: 3394 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-03-27  5:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 20:53 different background colours in different emacs windows Filippo A. Salustri
2011-03-25 22:40 ` Peter Dyballa
2011-03-25 23:52   ` Filippo A. Salustri
2011-03-26 10:02     ` Peter Dyballa
2011-03-26 11:22       ` Filippo A. Salustri
2011-03-26 11:34         ` Peter Dyballa
2011-03-26 11:46           ` Filippo A. Salustri
2011-03-26 16:48             ` Peter Dyballa
2011-03-26 23:01               ` Filippo A. Salustri
2011-03-27  5:56                 ` Alan E. Davis
     [not found] <mailman.13.1301091024.10079.help-gnu-emacs@gnu.org>
2011-03-25 23:52 ` Tim X

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.