help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I automatically determine the best frame-height?


From: David Karr
Subject: How can I automatically determine the best frame-height?
Date: Tue, 20 Apr 2021 14:45:28 -0700

In my .emacs file, I have code like the following at the top:
-------------
(set-frame-position (selected-frame) 0 0)
(set-frame-height (selected-frame) 68)
--------------

I typically run on a Windows 10 laptop, connecting to an external monitor.
The frame height of 68 works out to put the status line just above the
Windows status bar, when connecting to my usual monitor.

Sometimes, I run the laptop without an external monitor. In that case, that
startup code is a little annoying, as I then have to shrink and move the
window a few times until I get it in the right position.

Is there a better way to do this, so it will just automatically size itself
so that the top is at the top of the screen, and the bottom is snug against
the status bar?

I normally run this on Cygwin, but I run the same .emacs file on my Ubuntu
VM running on the same laptop.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]