emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master fe7c015b20: Support XFCE in wallpaper.el


From: Po Lu
Subject: Re: master fe7c015b20: Support XFCE in wallpaper.el
Date: Wed, 28 Sep 2022 08:34:28 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Stefan Kangas <stefankangas@gmail.com> writes:

> Won't it just use whatever is in $DISPLAY?  I'm seeing this in
> "emacs -Q -nw", running in an xterm:

Yes, but then you can do the same in Emacs:

  (x-open-connection (getenv "DISPLAY"))
  (display-monitor-attributes-list (car (last (terminal-list))))

and DISPLAY might not be set either.

>   ELISP> Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 16384 x 16384
>   DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
>   DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y
> axis) 597mm x 336mm
>      2560x1440     59.95*+
>      1920x1200     59.88
>      1920x1080     60.00
>      1680x1050     59.95
>      1600x1200     60.00
>      1280x1024     75.02    60.02
>      1280x800      59.81
>      1152x864      75.00
>      1024x768      75.03    60.00
>      800x600       75.00    60.32
>      640x480       75.00    59.94
>   HDMI-0 disconnected (normal left inverted right x axis y axis)
>   DP-0 disconnected (normal left inverted right x axis y axis)
>   DVI-D-0 disconnected (normal left inverted right x axis y axis)
>   DP-1 disconnected (normal left inverted right x axis y axis)
>
> So it seems like we could just look for "^\\([^ ]\\)+ connected" and
> just use the first one?  If nothing else, couldn't we use it to get a
> default value?

Well, then you run into the problem where the format of the texxt
returned by the XRandR utility is not exactly stable.

On servers supporting version 1.5 or later of the extension,

  xrandr --listmonitors

is also a better idea, as that is the kind of monitor XFCE will use.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]