From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JohnF Newsgroups: gmane.emacs.help Subject: Re: Screen size (pixels or whatever) Date: Wed, 24 Jun 2015 04:57:15 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: References: <79ACCF65-DDC4-4B95-8E16-20DC867190D3@yandex.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435122023 22516 80.91.229.3 (24 Jun 2015 05:00:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2015 05:00:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 24 07:00:18 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7cnJ-0007x9-Sl for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 07:00:18 +0200 Original-Received: from localhost ([::1]:48582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7cnI-0000b7-Sm for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 01:00:16 -0400 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: panix3.panix.com Original-X-Trace: reader1.panix.com 1435121835 19829 166.84.1.3 (24 Jun 2015 04:57:15 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Wed, 24 Jun 2015 04:57:15 +0000 (UTC) User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (NetBSD/6.1.5 (i386)) Original-Xref: usenet.stanford.edu gnu.emacs.help:212826 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105111 Archived-At: Marko Vojinovic wrote: > JohnF wrote: >> Vasily Korytov wrote: >> > Vasily Korytov ???????(??): >> >> 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, Right, my bad. Sorry, I overlooked that. Thanks. > 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 -- John Forkosh ( mailto: j@f.com where j=john and f=forkosh )