我可以检测 Emacs 中的显示尺寸/分辨率吗? [英] Can I detect the display size/resolution in Emacs?

查看:15
本文介绍了我可以检测 Emacs 中的显示尺寸/分辨率吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据当前的显示分辨率更改 XEmacs 的窗口/框架大小.

I'd like to change the window/frame size of my XEmacs based on the current display resolution.

当我单独运行笔记本电脑或连接到带有外部显示器的扩展坞时,这非常有用.在任何一种情况下,我都希望 Emacs 在我启动时检测主屏幕分辨率并相应地调整其主窗口框架大小.

This is useful when I run my laptop either by itself or attached to a docking station with an external monitor. In either situation, I'd like Emacs to detect the primary screen resolution and adjust its main window frame size accordingly when I start it up.

推荐答案

当前显示分辨​​率可使用以下功能(均为非交互式).

The current display resolution is available using the following functions (both non-interactive).

(x-display-pixel-width)
(x-display-pixel-height)

这篇关于我可以检测 Emacs 中的显示尺寸/分辨率吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆