[Top][All Lists]

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

Re: [External] : programmatically make window full length but not change

From: Mickey Ferguson
Subject: Re: [External] : programmatically make window full length but not change width
Date: Mon, 1 Aug 2022 12:14:49 -0700

For most of my computers, I can use a default value of 60, but on one of my
computers, I need 175.  So I've put this code in my .emacs file (after
loading the two frame- libraries).  On my one computer, I have an
environment variable that it reads.  This seems to do the trick!  Thanks
for the help, Drew!

(setq window-mgr-title-bar-pixel-height
    (or (getenv "emacs-window-mgr-title-bar-pixel-height") "60")))

*Mickey Ferguson*

On Mon, Aug 1, 2022 at 10:57 AM Drew Adams <> wrote:

> > After downloading the frame-cmds.el, I also needed frame-fns.el to allow
> things to compile.  One other tweak I needed, since my windows toolbar is
> at the bottom of the screen, I needed to add:
> >
> > (setq window-mgr-title-bar-pixel-height '175)
> >
> > This made it size correctly on my laptop.  However, if I connect to my
> remote desktop computer, using either VNC or Remote Desktop Connection,
> then that sizing is incorrect.  It seemed to be around 60 for that
> computer.  Oh, and each of these computers have a 1920x1080 display
> setting, if that makes any difference.
> >
> > Is this a setting that needs to be set individually for each computer?
> For each context where the title bar has a different height.
> `C-h v window-mgr-title-bar-pixel-height':
>   Height of frame title bar provided by the window manager, in pixels.
>   You might alternatively call this constant the title-bar "width" or
>   "thickness".  There is no way for Emacs to determine this, so you
>   must set it.
> You can set it conditionally based on however you can
> determine the context and the right height for it.
> From the source file you see that the default value is
> set using this:
> (cond ((eq window-system 'mac) 22)
>       ;; For older versions of macOS, 40 might be better.
>       ((eq window-system 'ns)  50)
>       (t  27))
> If the difference between the contexts you mention is
> reflected in the value of `window-system' then you can
> use a similar sexp to set it appropriately in your init
> file:
>  (setq window-mgr-title-bar-pixel-height
>        (cond ((eq window-system 'FOO) N)
>              ((eq window-system 'BAR) M)
>              ...
>              (t 27)))
> Where FOO, BAR, N, and M are whatever values you need.
> > If so, that's getting outside of what I would know how to do, since my
> goal is to have a single .emacs file for all of the computers where I
> work.  Maybe it would be a registry setting or environment variable, for
> which I could easily have each computer have its own customized setting,
> and then the .emacs would get that env var or reg value on startup?
> See above.


*For more information on how and why we collect your personal 
information, please visit our Privacy Policy 

reply via email to

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