[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Screen size (pixels or whatever)
From: |
Marko Vojinovic |
Subject: |
Re: Screen size (pixels or whatever) |
Date: |
Tue, 23 Jun 2015 04:35:27 +0100 |
On Tue, 23 Jun 2015 01:19:41 +0000 (UTC)
JohnF <john@please.see.sig.for.email.com> wrote:
> Vasily Korytov <vasily.korytov@yandex.com> wrote:
> > 22 ????. 2015 ? 23:49 Vasily Korytov
> > <vasily.korytov@yandex.com> ???????(??):
> >> How do I get screen size in Emacs?
> > The answer is (display-pixel-width) and (display-pixel-height).
> > Found the answer just after posting.
> > Thanks for reading this.
>
> I've been using
> ;;; initial frame width,height,position
> (set-frame-width (selected-frame) 80) ; #chars wide
> (set-frame-height (selected-frame) 52) ; #lines ling
> (set-frame-position (selected-frame) 10 10 ) ; x y from upper-left
> What's the diff???
As the OP explained in the original post, he wants those rules to work
conditionally, if certain screen resolution is detected.
I don't know how to do that internally in Emacs, but if one is running
under Linux, the command "xrandr | grep \*" will tell you the
resolution and frequency of the monitor. Maybe one can have Emacs
execute this and parse the info...
HTH, :-)
Marko