[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Help with Frame Size
From: |
Drew Adams |
Subject: |
RE: Help with Frame Size |
Date: |
Fri, 22 May 2009 16:52:03 -0700 |
> I want to have my default frame be 150xfullheight. I know this has
> been brought up here before. I don't think it's ever necessarily been
> answered satisfactorily. I want the solution to work on both OS X
> using macports's emacs-app package and GNU Emacs 22.3 windows distro
> on Windows XP.
Use `set-frame-size'. It takes a number of lines as its second arg. Use
`frame-char-height' to get the height of a single line, in pixels. Use
`x-display-pixel-height' to get the height of your screen, in pixels. With these
things, you should be able to do what you want.
If `winmgr-display-available-pixel-bounds' is defined on your platform, then see
(nth 3 (winmgr-display-available-pixel-bounds)). That might be what you want to
use, instead of `x-display-pixel-height'.
Library `fit-frame.el' uses these things - you can get an idea from its code.
http://www.emacswiki.org/emacs/fit-frame.el
HTH.