https://github.com/dehydratedpotato/ppidump
A simple Mac command to get display Pixels Per Inch (ppi), without making retina-scaling mistakes.
https://github.com/dehydratedpotato/ppidump
display display-resolution displays macos pixel pixel-density pixels ppi resolution swift
Last synced: 16 days ago
JSON representation
A simple Mac command to get display Pixels Per Inch (ppi), without making retina-scaling mistakes.
- Host: GitHub
- URL: https://github.com/dehydratedpotato/ppidump
- Owner: dehydratedpotato
- License: mit
- Created: 2022-12-14T17:16:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T17:35:16.000Z (over 3 years ago)
- Last Synced: 2025-01-16T00:25:51.735Z (over 1 year ago)
- Topics: display, display-resolution, displays, macos, pixel, pixel-density, pixels, ppi, resolution, swift
- Language: Swift
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ppidump :desktop_computer:
## 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 :wink: