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

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

Re: How can I automatically determine the best frame-height?


From: Jean Louis
Subject: Re: How can I automatically determine the best frame-height?
Date: Wed, 21 Apr 2021 18:19:00 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Wayne Harris via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-04-21 18:07]:
> David Karr <davidmichaelkarr@gmail.com> writes:
> 
> > 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?
> 
> That is annoying.  I use --fullheight on the command line.  This could
> be useful to you.  At least on Windows it start up with the perfect
> height for me.
> 
> However, when I open a new frame, the new frame is taller than its
> parent.  I don't get why.  All I wish was for the frame to keep the same
> dimensions as the frame from which I issued the command.

You can put this in your ~/.emacs.d/early-init.el

(add-to-list 'default-frame-alist '(fullscreen . maximized))




-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




reply via email to

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