unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marko Vojinovic <vvmarko@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Screen size (pixels or whatever)
Date: Tue, 23 Jun 2015 04:35:27 +0100	[thread overview]
Message-ID: <20150623043527.4efd7d21@Yoda> (raw)
In-Reply-To: <mmac7d$bk4$2@reader1.panix.com>

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




  reply	other threads:[~2015-06-23  3:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 20:49 Screen size (pixels or whatever) Vasily Korytov
2015-06-22 20:52 ` Vasily Korytov
2015-06-23 14:23   ` Alan Schmitt
2015-06-23 14:59     ` Drew Adams
     [not found] ` <mailman.5472.1435016699.904.help-gnu-emacs@gnu.org>
2015-06-23  0:00   ` Emanuel Berg
2015-06-23  1:19   ` JohnF
2015-06-23  3:35     ` Marko Vojinovic [this message]
     [not found]     ` <mailman.5480.1435030538.904.help-gnu-emacs@gnu.org>
2015-06-24  4:57       ` JohnF

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150623043527.4efd7d21@Yoda \
    --to=vvmarko@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).