[Top][All Lists]
[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.
- Re: is there a hook run when display geometry changes?, (continued)
- Re: is there a hook run when display geometry changes?, Edward O'Connor, 2011/08/12
- Re: is there a hook run when display geometry changes?, Eli Zaretskii, 2011/08/12
- Re: is there a hook run when display geometry changes?, Edward O'Connor, 2011/08/15
- Re: is there a hook run when display geometry changes?, Eli Zaretskii, 2011/08/16
- Re: is there a hook run when display geometry changes?, David De La Harpe Golden, 2011/08/25
- Re: is there a hook run when display geometry changes?, martin rudalics, 2011/08/16
- Re: is there a hook run when display geometry changes?, Stefan Monnier, 2011/08/16
Re: is there a hook run when display geometry changes?, David De La Harpe Golden, 2011/08/12
Re: is there a hook run when display geometry changes?,
Antoine Levitt <=