Git Product home page Git Product logo

wlinfo's Introduction

Wlinfo queries Wayland for information about physical displays connected to the system. It can print information about the physical dimensions of such displays, and screen resolution, and display scaling characteristics.

Wlinfo is built as a standard automake/autoconf program:

$ ./autogen.sh
$ ./configure
$ make

The output of wlinfo looks like this:

output 4
---------
x: 0
y: 0
physical_width: 640
physical_height: 400
subpixel: 0
make: DEL
model: DELL U3014
width: 2560
height: 1600
dpi: 103.2
scale: 1

output 5
---------
x: 2560
y: 0
physical_width: 310
physical_height: 170
subpixel: 0
make: MEI
model: 0x96a2
width: 2560
height: 1440
dpi: 451.3
scale: 2

My personal motivation for this code is to allow Emacs instances to pick an appropriate font size. This is necessary because I have a high-DPI laptop screen, and a low-DPI monitor that I sometimes attach to my laptop. Wayland itself supports per-monitor display scaling, so it can scale the high-DPI monitor at 2x (for instance), and the low-DPI monitor at 1x. However, Emacs is a legacy X11 application that can't do display scaling. Therefore I need my Emacs instance to choose an appropriate font size based on which physical displays are actually connected to the system at the time that Emacs starts up.

This code is released under a version of the MIT license used by X11. This is the same license used by Wayland and Weston. Some of this code is derived from code found in Weston (in particular, the code for weston-info).

wlinfo's People

Contributors

eklitzke avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.