Skip to content

A simple Mac command to get display Pixels Per Inch (ppi), without making retina-scaling mistakes.

License

Notifications You must be signed in to change notification settings

dehydratedpotato/ppidump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ppidump 🖥️

Deets

A small mac command to find the Pixels Per Inch (ppi/Pixel Density) of every connected display. It calculates the data using physical resolution, so it shouldn't make any mistakes from retina-scaling.

I threw it together in, like, an hour. It's written in Swift because why not.

Building

Just run make. Boom, your done.

Usage

The command defaults to printing all display info, but you can manually input data using

ppidump [width_px height_px diag_size]

For example, like

ppidump 2560 1440 24.5

Example Output

$ ./ppidump

Built-in Retina Display (2560x1600 Physical at 13.3") = 227 ppi
LG HDR QHD (2560x1440 Physical at 31.5") = 93 ppi
DELL U2415 (1920x1200 Physical at 24.0") = 94 ppi

Display names are printed in cyan 😉