[Top][All Lists]

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

is there a hook run when display geometry changes?

From: Edward O'Connor
Subject: is there a hook run when display geometry changes?
Date: Fri, 12 Aug 2011 10:51:25 -0700


Depending on the geometry of the primary display, I like my Emacs to use
a different font size and a different window geometry. I have a function
in my .emacs which inspects (display-pixel-width) and
(display-pixel-height) and then does the right thing, and I run this
function from `emacs-startup-hook'.

This works well enough, but it'd be even awesomer if I could make Emacs
call this function automatically when I plug my laptop into an external
display. On GNUStep and Mac OS X, applications can listen for
NSApplicationDidChangeScreenParametersNotification for this sort of
thing. I assume there is similar functionality under X11 and on Windows.

Is there an existing hook for screen geometry changes that should be run
when Emacs gets an NSApplicationDidChangeScreenParametersNotification?
If not, is this a feature people would be interested in? What are other
people already doing for this?


reply via email to

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