4

At the bottom of the screen when emacs is open there is a strip of purple, meaning that emacs in terminal isnt maximizing to the full size that the terminal window allows and thus the background from the terminal is showing. I know this is nit-picky but my OCD is driving me crazy. Anyway to fix this?

I would post an image but I don't have enough stack karma points yet.

ADF
  • 41
  • 2
  • 1
    Comment a link to an image and I'll edit it in – nanny Jul 10 '15 at 19:41
  • [Related](http://stackoverflow.com/q/27758800/1219634) - Same question on SO – Kaushal Modi Jul 10 '15 at 20:11
  • Yeah, someone on SO yelled at me for posting this question there and I didn't know how to delete it. He was voting for removal? – ADF Jul 10 '15 at 21:34
  • @ADF I am **not** suggesting that this question should be closed as duplicate (and it also cannot be closed as duplicate as this is emacs.stackexchange and that is from stackoverflow); I simply put that link for extra reference. You are welcome to post such questions to emacs.SE :) – Kaushal Modi Jul 11 '15 at 02:06

1 Answers1

7

The Emacs manual says you can set the option frame-resize-pixelwise to non-nil to allow frame sizes by pixel. Normally the frame dimensions (not counting the menu bar, tool bar, etc) are integer multiples of frame-char-height in height and frame-char-width in width. The manual notes that you need to set this variable to non-nil in your init file so that it interacts properly with you window manager.

In your init.el or .emacs file, add this:

(setq frame-resize-pixelwise t)

to enable pixel resizing rather than char height/width resizing.

User Option: frame-resize-pixelwise

If this option is nil, a frame’s size is usually rounded to a multiple of the current values of that frame’s frame-char-height and frame-char-width. If this is non-nil, no rounding occurs, hence frame sizes can increase/decrease by one pixel.

Setting this causes the next resize operation to pass the corresponding size hints to the window manager. This means that this variable should be set only in a user’s initial file; applications should never bind it temporarily.

The precise meaning of a value of nil for this option depends on the toolkit used. Dragging the frame border with the mouse is usually done character-wise. Calling set-frame-size (see below) with arguments that do not specify the frame size as an integer multiple of its character size, however, may: be ignored, cause a rounding (GTK+), or be accepted (Lucid, Motif, MS-Windows).

With some window managers you may have to set this to non-nil in order to make a frame appear truly “maximized” or “fullscreen”.

casey
  • 242
  • 2
  • 10
  • This might not fully address the issue that OP is experiencing, but it helped me solve a problem that had been bothering me for a long time: having to tweak obscure settings in my window manager to make sure Emacs frames would properly maximize in KDE! So: Thank you and +1! :) – itsjeyd Jul 24 '15 at 07:38