使用 elisp 将 Emacs 框架最大化到一台显示器
我使用 maxframe.el 来最大化我的 Emacs 框架。
它在所有三个主要平台上都表现良好,除了我的双头 Mac 设置(Macbook Pro 15 英寸笔记本电脑和 23 英寸显示器)。
当最大化 Emacs 框架时,框架会扩展以填充两个显示器的宽度以及较大显示器的高度。
显然,我希望框架最大化以仅填充其所在的显示器。 如何使用 elisp 检测两个单独显示器的分辨率?
谢谢, Jacob
编辑:正如 Denis 指出的,设置 mf-max-width 是一个合理的解决方法。 但是(正如我应该提到的)我希望有一个适用于两台显示器和任何分辨率的解决方案。 也许是 OSX 特定的东西,采用 Windows 特定的 w32-send-sys-command 的风格。
I use maxframe.el to maximize my Emacs frames.
It works great on all three major platforms, except on my dual-head Mac setup (Macbook Pro 15-inch laptop with 23-inch monitor).
When maximizing an Emacs frame, the frame expands to fill the width of both monitors and the height of the larger monitor.
Obviously, I would like the frame to maximize to fill only the monitor it's on. How can I detect the resolutions of the two individual monitors using elisp?
Thanks,
Jacob
EDIT: As Denis points out, setting mf-max-width is a reasonable workaround. But (as I should have mentioned) I was hoping for a solution that works on both monitors and with any resolution. Maybe something OSX-specific in the style of the Windows-specific w32-send-sys-command.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我快速浏览了您提供给
maxframe.el
的参考资料,我认为您使用的技术与我使用的技术不同。 下面的代码片段对您有帮助吗?I quickly scanned the reference that you provided to
maxframe.el
and I don't think that you're using the same technique that I use. Does the following code snippet help you?自定义“mf-max-width”有效吗? 其文档:
Does customising `mf-max-width' work? Its documentation:
这种事情是窗口管理器的工作,而不是 emacs 的工作。 (例如,Xmonad 可以很好地处理全屏 emacs。)
This sort of thing is the job of your window manager, not the job of emacs. (For example, Xmonad handles full-screen emacs just fine.)