开发者

Can I detect the display size/resolution in Emacs?

开发者 https://www.devze.com 2022-12-18 03:13 出处:网络
I\'d like to change the window/frame size of my XEmacs based on the current display resolution. This is useful when I run my laptop either by开发者_运维知识库 itself or attached to a docking station

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

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.


For a more cross-platform solution, look at

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

If what you actually want to do is set the Emacs window to full screen on start-up, check out maxframe.el.


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

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

精彩评论

暂无评论...
验证码 换一张
取 消