emacs-devel
[Top][All Lists]
Advanced

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

Re: is there a hook run when display geometry changes?


From: Antoine Levitt
Subject: Re: is there a hook run when display geometry changes?
Date: Fri, 12 Aug 2011 21:09:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

12/08/11 19:51, Edward O'Connor
> Hi.
>
> 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?
>
>
> Thanks,
> Ted

Not sure if that's what you want, but there's a bunch of stuff in
special-event-map. If all else fails, you can always run an external
script that listens for the notifications, then executes the function
via emacsclient.




reply via email to

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