From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mickey Ferguson via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: [External] : programmatically make window full length but not change width Date: Mon, 1 Aug 2022 12:14:49 -0700 Message-ID: References: Reply-To: Mickey Ferguson Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25677"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Help-Gnu-Emacs (help-gnu-emacs@gnu.org)" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 21:22:36 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIazr-0006XL-Ee for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 21:22:35 +0200 Original-Received: from localhost ([::1]:56192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIazq-0004Kb-BP for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 15:22:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIasf-0001KC-PU for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 15:15:10 -0400 Original-Received: from mx0a-0019e102.pphosted.com ([67.231.149.242]:16776 helo=mx0b-0019e102.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIasb-0002LI-T8 for help-gnu-emacs@gnu.org; Mon, 01 Aug 2022 15:15:07 -0400 Original-Received: from pps.filterd (m0074412.ppops.net [127.0.0.1]) by mx0a-0019e102.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 271JDPDw030971 for ; Mon, 1 Aug 2022 19:15:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=motorolasolutions.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=PPS--2020-03-17; bh=GuXkppTQgxzVT9QBlTc27Gi5CqJM/MAiNtsSjvL+v/Q=; b=UIcB8BLXVf8lF8wdKh4sIXj4HEuJZg5hpYflN9Pg3uTgy5om10hjl1rn30Pc24WmA4g1 ytCzQwbdd1VtkZ0axPUlIosiUya4kaKiLK2hdZvdwCmvyLUBEcxkKST8arAywoTvpTmY 6KLcu0FUoey2CVKR5tCb4KOMgnhU+z1J9xFtRYp8LIV4YnOvJZbVvxzfr5X/YUNuLKFG MCUmWr8r06fdUWwgdWcO4a1ZYl1F+DyPSODWJ3gLMOto2vgc+F3a6EGIE3IA/sJ/xMiQ pLBQZ0/oBg7T3OqenbIwKolmshS3731avpgZRKChD3iCRITFEG81Wy6O6mzJ8u0TxzW5 OQ== Original-Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0019e102.pphosted.com (PPS) with ESMTPS id 3hpmsur06v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Mon, 01 Aug 2022 19:15:02 +0000 Original-Received: by mail-vs1-f71.google.com with SMTP id q8-20020a056102100800b0035842f7fd68so782066vsp.19 for ; Mon, 01 Aug 2022 12:15:02 -0700 (PDT) X-Gm-Message-State: AJIora/XBp0df5caoNeKU2ZHKT939+/9Y8C62O1df8/vJ0CqWrXV9FnD L3lrXeeAxjP9t8ysG7kczkX9YwbC0pHHRsOui+IwRzTqx0k8iSHGeasRIvl+O0sUWmLDxPeO3/3 oMV0cNA1Eldq/DnncNWim5LgxG3cJzweM X-Received: by 2002:a67:b841:0:b0:358:739c:8a79 with SMTP id o1-20020a67b841000000b00358739c8a79mr6199762vsh.52.1659381300890; Mon, 01 Aug 2022 12:15:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sx9Rl/0RPF+eTOdS10AMrhy4sBHd0ZJJDY+aBbFVD96AF2eOqvK7ZRcs2YhdX+WRKQ8EZFnK+l2WSanz1rFlI= X-Received: by 2002:a67:b841:0:b0:358:739c:8a79 with SMTP id o1-20020a67b841000000b00358739c8a79mr6199752vsh.52.1659381300463; Mon, 01 Aug 2022 12:15:00 -0700 (PDT) In-Reply-To: X-Proofpoint-ORIG-GUID: sacf_CD1_AE6VGzmnBG4AauL3fVIQhBb X-Proofpoint-GUID: sacf_CD1_AE6VGzmnBG4AauL3fVIQhBb X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 adultscore=0 priorityscore=1501 suspectscore=0 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208010096 Received-SPF: pass client-ip=67.231.149.242; envelope-from=prvs=221265a30b=mickey.ferguson@motorolasolutions.com; helo=mx0b-0019e102.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138732 Archived-At: 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 (string-to-number (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 .*