* Multiple monitors, different setup
@ 2015-03-14 8:36 Rob Kinsey
2015-03-14 13:24 ` Javier
2015-03-14 16:42 ` Rob Kinsey
0 siblings, 2 replies; 4+ messages in thread
From: Rob Kinsey @ 2015-03-14 8:36 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
Just getting into emacs right now and have got a set up I am happy with using the .emacs file.
At present I have a macbook pro and an external monitor. when the two are connected, to get emacs opening how I want to, i.e. open on non primary monitor and nearly maximized, I have used this line in the .emacs file:
(setq default-fram-alist
'((top + -550) (left + -1400) (width . 190) (height . 60)))
which puts it nicely on my macbooks monitor which when docked is not the primary monitor.
Is there a way that I can have the .emacs file do a check to see if the second monitor is present so that when it is not docked, my emacs screen can be re positioned so it is in standard default out of the box emacs mode?
I am assuming an if statement in the lisp checking for dvi port but not sure how.
any help on this would be greatly appreciated.
Kind regards
P166BUG
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple monitors, different setup
2015-03-14 8:36 Multiple monitors, different setup Rob Kinsey
@ 2015-03-14 13:24 ` Javier
2015-03-14 13:45 ` Eli Zaretskii
2015-03-14 16:42 ` Rob Kinsey
1 sibling, 1 reply; 4+ messages in thread
From: Javier @ 2015-03-14 13:24 UTC (permalink / raw)
To: help-gnu-emacs
> Is there a way that I can have the .emacs file do a check to see if
> the second monitor is present so that when it is not docked, my
> emacs screen can be re positioned so it is in standard default out
> of the box emacs mode?
don't know much about MacOs. I'd try look at this info page
(info "(elisp) Multiple Terminals")
(x-display-list) will give you a list of the displays available for
the Xserver.
If you want the sizes of the displays I don't know how to get them
directly from elisp. You can use the system command xwininfo for the
root window.
xwininfo -display 0:0 -root
display is in the form HOST:SERVER.SCREEN. You will need to parse the
output of the command and extract Width and Height.
Width: 1280
Height: 1024
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple monitors, different setup
2015-03-14 13:24 ` Javier
@ 2015-03-14 13:45 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-03-14 13:45 UTC (permalink / raw)
To: help-gnu-emacs
> From: Javier <nospam@nospam.com>
> Date: Sat, 14 Mar 2015 13:24:09 +0000 (UTC)
>
> > Is there a way that I can have the .emacs file do a check to see if
> > the second monitor is present so that when it is not docked, my
> > emacs screen can be re positioned so it is in standard default out
> > of the box emacs mode?
>
> don't know much about MacOs. I'd try look at this info page
>
> (info "(elisp) Multiple Terminals")
>
> (x-display-list) will give you a list of the displays available for
> the Xserver.
>
> If you want the sizes of the displays I don't know how to get them
> directly from elisp.
The same node mentioned above describes the function
display-monitor-attributes-list available in the recent Emacs
versions, which can provide this information.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple monitors, different setup
2015-03-14 8:36 Multiple monitors, different setup Rob Kinsey
2015-03-14 13:24 ` Javier
@ 2015-03-14 16:42 ` Rob Kinsey
1 sibling, 0 replies; 4+ messages in thread
From: Rob Kinsey @ 2015-03-14 16:42 UTC (permalink / raw)
To: help-gnu-emacs
On Saturday, March 14, 2015 at 8:37:00 AM UTC, Rob Kinsey wrote:
> Hi all,
>
> Just getting into emacs right now and have got a set up I am happy with using the .emacs file.
>
> At present I have a macbook pro and an external monitor. when the two are connected, to get emacs opening how I want to, i.e. open on non primary monitor and nearly maximized, I have used this line in the .emacs file:
>
> (setq default-fram-alist
> '((top + -550) (left + -1400) (width . 190) (height . 60)))
>
> which puts it nicely on my macbooks monitor which when docked is not the primary monitor.
>
> Is there a way that I can have the .emacs file do a check to see if the second monitor is present so that when it is not docked, my emacs screen can be re positioned so it is in standard default out of the box emacs mode?
>
> I am assuming an if statement in the lisp checking for dvi port but not sure how.
>
> any help on this would be greatly appreciated.
>
> Kind regards
>
> P166BUG
Thanks very much for your replies, I can do a little more research now, still learning, just need a nudge from time to time.
Regards
P166BUG
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-14 16:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-14 8:36 Multiple monitors, different setup Rob Kinsey
2015-03-14 13:24 ` Javier
2015-03-14 13:45 ` Eli Zaretskii
2015-03-14 16:42 ` Rob Kinsey
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).