0

Is there a way for emacs to receive display changes notification from the windows manager? I understand this might be an OS dependent question, so I'm particularly interested in the interaction between emacs and Gnome 3 windows manager (on Linux of course).

I'd like emacs to invoke certain functions when such event occurs.

  • Can you go into more detail about which events you're interested in, and what how you want Emacs to respond? – phils Sep 16 '20 at 12:17
  • FYI this article is longish, but excellent reading, and I suspect it is somewhat related to your question: https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/ (the notes on SIGIO in particular). – phils Sep 16 '20 at 12:21
  • So in particular I would like to have an emacs hook when a window changes display. – Damian Nadales Sep 16 '20 at 16:13
  • And none of `C-h i g (elisp)Window Hooks` is sufficient? (n.b. Lots of changes in that area in 27.1). I can't tell what "changes display" means, btw. – phils Sep 16 '20 at 21:11
  • FWIW if you can tell gnome3 to send SIGUSR1 or SIGUSR2 to Emacs whenever it does the thing you're interested in, you can write custom handlers for those two signals in elisp. – phils Sep 17 '20 at 01:55
  • Thank y'all. @phils, I could not find anything there, but is seems `'focus-in-hook` might do the trick: when I click emacs' window border to move it to a different monitor it will call this hook, and the same will happen if I press the shortcuts to move a window. – Damian Nadales Sep 17 '20 at 08:26

0 Answers0