Q: how do I detect/specify the monitor a frame is on?
I'm working off of a laptop that has an external monitor connected to it. I therefore have two monitors (call them INTERNAL and EXTERNAL).
On occasion, I want to do the following:
- Adjust an existing frame's parameters based on the monitor it's on
- Make a new frame on the other monitor
I think I can tell which monitor I'm currently on with
frame-monitor-attributes
.
However, I don't know how to address point 2: given that I'm on monitor EXTERNAL, how do I make a new frame on monitor INTERNAL (and vice versa)?
I suspect I could rig something up by accessing the x location, but that seems hacky to me.
Notes:
- I've looked at
make-frame-on-display
, but, unless I'm misunderstanding, "display" here means an X display or a terminal. - Related threads that don't quite resolve point 2:
make-frame
accepts those arguments/parameters (among others) when creating a frame. [Note that both Emacs 25 and the master branch have some important bug fixes regarding placement of new frames, which are not available in earlier versions.]'(width . (text-pixels . 1900))
and'(height . (text-pixels . 1054))
. Those would be in lieu of the standardwidth
andheight
parameters that we are all accustomed to seeing.