I have a multi-screen display. Within emacs (GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) on Windows 7), how can I determine the number of physical screens, and cause things to happen on different screens? For example, I might want to open a new frame in a different screen, or I might want to move the frame in which Emacs is starting to another screen.
I'm not sure if these functions work on Windows, but on Linux and Mac OS X you can use:
x-display-screens
: Number of monitorsx-display-pixel-width
: Current screen (screen that contains Emacs windows) widthx-display-pixel-height
: Current screen heightset-frame-width
and set-frame-height
: resizeset-frame-position
: Move frameFor example if you want to create a new frame in another screen, you can do:
(when (and (display-graphic-p) (= (display-screens) 2))
(make-frame)
(set-frame-position (selected-frame) 1280 0))
Where 1280 is the width of your first screen.
Checkout pos-tip.el code (http://www.emacswiki.org/emacs/pos-tip.el)
It says it works in X and Windows so probably you could find some compatible layer in it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With