unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: is there a hook run when display geometry changes?
Date: Fri, 12 Aug 2011 21:09:28 +0200	[thread overview]
Message-ID: <874o1ma1lj.fsf@gmail.com> (raw)
In-Reply-To: CAME3nGLnjLXixmSY45BWFX6qtCp2_XBR4x6a281hO6Mu=rnSuQ@mail.gmail.com

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.




      parent reply	other threads:[~2011-08-12 19:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 17:51 is there a hook run when display geometry changes? Edward O'Connor
2011-08-12 18:03 ` Eli Zaretskii
2011-08-12 18:15   ` Edward O'Connor
2011-08-12 18:28     ` Eli Zaretskii
2011-08-12 18:59       ` David De La Harpe Golden
2011-08-12 19:10         ` Thien-Thi Nguyen
2011-08-12 19:40           ` David De La Harpe Golden
2011-08-12 20:04             ` Thien-Thi Nguyen
2011-08-12 21:18               ` David De La Harpe Golden
2011-08-12 21:47                 ` Thien-Thi Nguyen
2011-08-13  5:47                   ` David De La Harpe Golden
2011-08-12 19:37       ` Edward O'Connor
2011-08-12 20:20         ` Eli Zaretskii
2011-08-15 21:48           ` Edward O'Connor
2011-08-16  6:48             ` Eli Zaretskii
2011-08-25  5:21               ` David De La Harpe Golden
2011-08-16 18:54             ` martin rudalics
2011-08-16 20:34               ` Stefan Monnier
2011-08-12 19:01 ` David De La Harpe Golden
2011-08-12 19:09 ` Antoine Levitt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874o1ma1lj.fsf@gmail.com \
    --to=antoine.levitt@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).