Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Border/frame around Emacs frame

How to change the color of some outer or inner border? Whenever I change border-color of the frame, I don't see any changes and it is not allowing me to change the border width.

So far, what did work was

(set-frame-parameter (selected-frame) 'internal-border-width 15)

which adds some frame around the buffer.

But I don't know how to change the inner color. Does anyone know how to have a nice border/frame around the working space?

Any method goes.

EDIT: Added what sds accomplished:

I would like actually to have area around it to have a different color, so outside of the red.

enter image description here

I found an example (read: this is what I was after all along) of a frame I would like to accomplish.

example image

like image 501
PascalVKooten Avatar asked Dec 27 '12 14:12

PascalVKooten


2 Answers

It does appear that you cannot change the border width of an existing frame, but you can create a new frame with the border width you want:

(frame-parameter (make-frame '((border-width . 10))) 'border-width)
==> 10

However, the appearance of the new frame does not differ (as far as I can tell on ubuntu) from that of all the other frames (where border-width is 0); which, I guess, is not all that surprising given that the window manager may not pay attention to [the border-width] you specify.

The more relevant question, I think, is what are you really trying to do?

Do you want Emacs windows (known as frames in the Emacs world) to differ visually from all the other windows?

If this is what you are after, then you have to realize that window decorations are the domain of the window manager (as mentioned above), and applications (like Emacs) can only affect those using "hints", and window managers are free to ignore them.

However, you can change the parameters of the fringe face:

(set-face-background 'fringe "red")

which should make the Emacs frame appearance very distinct.

like image 192
sds Avatar answered Oct 13 '22 12:10

sds


I think you are specifying the fringe. You can set the fringe colour with this in your colour-theme function if you are using one.

(defun color-theme-whatever ()
  "A color theme"
(color-theme-install
 '(color-theme-whatever
   ((fringe ((t (:background "#111" :foreground "#444"))))))))
like image 38
Santosh Avatar answered Oct 13 '22 11:10

Santosh