Repository: xzhih/one-key-hidpi
Branch: master
Commit: aa4c0b500da2
Files: 10
Total size: 79.2 KB
Directory structure:
gitextract_wq5q0e8q/
├── Icons.plist
├── README-zh.md
├── README.md
├── displayIcons/
│ ├── MacBook.icns
│ ├── MacBookPro.icns
│ ├── ProDisplayXDR.icns
│ ├── ProDisplayXDR.tiff
│ └── iMac.icns
├── hidpi.command
└── hidpi.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: Icons.plist
================================================
board-ids
Mac-C3EC7CD22292981F
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-C3EC7CD22292981F.tiff
resolution-preview-x
41
resolution-preview-y
67
resolution-preview-width
144
resolution-preview-height
90
Mac-AFD8A9D944EA4843
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-AFD8A9D944EA4843.tiff
resolution-preview-x
47
resolution-preview-y
64
resolution-preview-width
131
resolution-preview-height
83
Mac-189A3D4F975D5FFC
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-189A3D4F975D5FFC.tiff
resolution-preview-x
47
resolution-preview-y
64
resolution-preview-width
131
resolution-preview-height
83
Mac-3CBD00234E554E41
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-3CBD00234E554E41.tiff
resolution-preview-x
41
resolution-preview-y
67
resolution-preview-width
144
resolution-preview-height
90
Mac-2BD1B31983FE1663
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-2BD1B31983FE1663.tiff
resolution-preview-x
41
resolution-preview-y
67
resolution-preview-width
144
resolution-preview-height
90
Mac-42FD25EABCABB274
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-42FD25EABCABB274.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
Mac-FA842E06C61E91C5
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-FA842E06C61E91C5.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
Mac-65CE76090165799A
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
Mac-DB15BD556843C820
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-DB15BD556843C820.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
Mac-B809C3757DA9BB8D
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-B809C3757DA9BB8D.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
Mac-E43C1C25D4880AD6
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-E43C1C25D4880AD6.tiff
resolution-preview-x
47
resolution-preview-y
64
resolution-preview-width
131
resolution-preview-height
83
Mac-4B682C642B45593E
display-icon
com.apple.imac-unibody-21
vendors
1e6d
products
5b10
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b10.tiff
resolution-preview-x
33
resolution-preview-y
47
resolution-preview-width
160
resolution-preview-height
90
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b10.icns
5b7b
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b7b.tiff
resolution-preview-x
33
resolution-preview-y
47
resolution-preview-width
160
resolution-preview-height
90
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b7b.icns
5b11
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b11.tiff
resolution-preview-x
11
resolution-preview-y
47
resolution-preview-width
202
resolution-preview-height
114
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b11.icns
5b74
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b74.tiff
resolution-preview-x
11
resolution-preview-y
47
resolution-preview-width
202
resolution-preview-height
114
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b74.icns
9e6d
products
5b11
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b11.tiff
resolution-preview-x
11
resolution-preview-y
47
resolution-preview-width
202
resolution-preview-height
114
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b11.icns
5b74
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b74.tiff
resolution-preview-x
11
resolution-preview-y
47
resolution-preview-width
202
resolution-preview-height
114
display-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-1e6d/DisplayProductID-5b74.icns
610
products
9226
display-icon
com.apple.led-cinema-display-27
9227
display-icon
com.apple.led-cinema-display-27
9236
display-icon
com.apple.led-cinema-display-24
a027-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-e1e1df.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a027-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-9d9da0.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a027-ebd7bf
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-ebd7bf.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a027-e8c9c3
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-e8c9c3.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a027-d9b49a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-d9b49a.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a028-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a028-e1e1df.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a028-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a028-9d9da0.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a028-ebd7bf
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a028-ebd7bf.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a028-e8c9c3
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a028-e8c9c3.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a028-d9b49a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a027-d9b49a.tiff
resolution-preview-x
52
resolution-preview-y
66
resolution-preview-width
122
resolution-preview-height
76
a029
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a029.tiff
resolution-preview-x
47
resolution-preview-y
64
resolution-preview-width
131
resolution-preview-height
83
a02a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a02a.tiff
resolution-preview-x
47
resolution-preview-y
64
resolution-preview-width
131
resolution-preview-height
83
a033-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a033-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a034-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a034-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a037-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03d-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03d-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03e-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03e-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a037-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a033-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a030-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-9d9da0.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a030-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-e1e1df.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a031-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-9d9da0.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a031-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-e1e1df.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a038-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-9d9da0.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a038-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-e1e1df.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a040-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-9d9da0.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a040-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a030-e1e1df.tiff
resolution-preview-x
40
resolution-preview-y
62
resolution-preview-width
147
resolution-preview-height
92
a02e
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a02e.tiff
resolution-preview-x
41
resolution-preview-y
67
resolution-preview-width
144
resolution-preview-height
90
a02f
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a02f.tiff
resolution-preview-x
41
resolution-preview-y
67
resolution-preview-width
144
resolution-preview-height
90
a032
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a032.tiff
resolution-preview-x
33
resolution-preview-y
68
resolution-preview-width
160
resolution-preview-height
90
ae19
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a032.tiff
resolution-preview-x
33
resolution-preview-y
68
resolution-preview-width
160
resolution-preview-height
90
ae1a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a032.tiff
resolution-preview-x
33
resolution-preview-y
68
resolution-preview-width
160
resolution-preview-height
90
ae1b
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a032.tiff
resolution-preview-x
33
resolution-preview-y
68
resolution-preview-width
160
resolution-preview-height
90
ae11
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae12
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae13
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae15
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae16
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae17
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae1d
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-7BA5B2D9E42DDD94.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae1e
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-7BA5B2D9E42DDD94.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae1f
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-7BA5B2D9E42DDD94.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
a039-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a039-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a039-ebd7bf
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-ebd7bf.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a039-d9b49a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-ebd7bf.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03c-9d9da0
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-9d9da0.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03c-e1e1df
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-e1e1df.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03c-ebd7bf
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-ebd7bf.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
a03c-d9b49a
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-a03c-ebd7bf.tiff
resolution-preview-x
48
resolution-preview-y
62
resolution-preview-width
131
resolution-preview-height
83
ae25
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae26
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae27
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/Models/Mac-65CE76090165799A.tiff
resolution-preview-x
12
resolution-preview-y
71
resolution-preview-width
202
resolution-preview-height
114
ae21
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
ae22
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
ae23
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
ae2d
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
ae2e
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
ae2f
display-resolution-preview-icon
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x
5
resolution-preview-y
45
resolution-preview-width
216
resolution-preview-height
121
display-resolution-preview-icon-90
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-90
60
resolution-preview-y-90
30
resolution-preview-width-90
106
resolution-preview-height-90
189
display-resolution-preview-icon-180
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff
resolution-preview-x-180
5
resolution-preview-y-180
45
resolution-preview-width-180
216
resolution-preview-height-180
121
display-resolution-preview-icon-270
/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-610/DisplayProductID-ae2f_Potrait.tiff
resolution-preview-x-270
60
resolution-preview-y-270
30
resolution-preview-width-270
106
resolution-preview-height-270
189
display-icon
com.apple.cinema-display
VID
products
PID
display-resolution-preview-icon
PICON
resolution-preview-x
RPX
resolution-preview-y
RPY
resolution-preview-width
RPW
resolution-preview-height
RPH
display-icon
DICON
display-icon
public.display
================================================
FILE: README-zh.md
================================================
# 一键开启 macOS HiDPI
## 说明
[English](README.md) | [中文](README-zh.md)
此脚本的目的是为中低分辨率的屏幕开启 HiDPI 选项,并且具有原生的 HiDPI 设置,不需要 RDM 软件即可在系统显示器设置中设置
macOS 的 DPI 机制和 Windows 下不一样,比如 1080p 的屏幕在 Windows 下有 125%、150% 这样的缩放选项,而同样的屏幕在 macOS 下,缩放选项里只是单纯的调节分辨率,这就使得在默认分辨率下字体和UI看起来很小,降低分辨率又显得模糊
同时,此脚本也可以通过注入修补后的 EDID 修复闪屏,或者睡眠唤醒后的闪屏问题,当然这个修复因人而异
开机的第二阶段 logo 总是会稍微放大,因为分辨率是仿冒的
设置:


## 使用方法
1.远程模式: 在终端输入以下命令回车即可
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi.sh)"
```
2.本地模式: 下载项目解压,双击 `hidpi.command` 运行

## 恢复
### 命令恢复
如果还能进系统,就再次运行命令选择选项 3 关闭 HIDPI。
### 恢复模式
如果使用此脚本后,开机无法进入系统,请到 macos 恢复模式,打开终端
这里有两种方式进行关闭,建议选第一种
1. 快捷恢复
```bash
ls /Volumes/
```
你会看到你的系统盘
```bash
cd /Volumes/你的系统盘/Users/
ls
```
你可以看到所有用户的家目录
```bash
cd 你的用户名
./.hidpi-disable
```
2. 手动恢复
使用终端删除 `Library/Displays/Contents/Resources/Overrides` 下删除所有通过外部注入的显示器配置文件夹
具体命令如下:
```bash
ls /Volumes/
rm -rf /Volumes/你的系统盘/Library/Displays/Contents/Resources/Overrides
```
## 从以下得到启发
https://www.tonymacx86.com/threads/solved-black-screen-with-gtx-1070-lg-ultrafine-5k-sierra-10-12-4.219872/page-4#post-1644805
https://github.com/syscl/Enable-HiDPI-OSX
================================================
FILE: README.md
================================================
# Enable macOS HiDPI
## Explanation
[English](README.md) | [中文](README-zh.md)
This script can simulate macOS HiDPI on a non-retina display, and have a "Native" Scaled in System Preferences.
Some device have wake-up issue, script's second option may help, it inject a patched EDID, but another problem may exists here.
Logo scaling up may not be resolved, cuz the higher resolution is faked.
System Preferences


## Usage
1.Remote Mode: Run this script in Terminal
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi.sh)"
```
2.Local Mode: Download ZIP, decompressing it, and double click `hidpi.command` to run

## Recovery
### Normal
Still running the script in the terminal, but choose option 3
### Recovery mode
If you cant boot into system, or get any another issues, you can boot into macOS Recovery mode, and use the Terminal.app
There are two ways to close it. It is recommended to choose the first one
1.
```bash
ls /Volumes/
```
you can see all Disk.
```bash
cd /Volumes/"Your System Disk Part"/Users/
ls
```
you can see user home directory.
```bash
cd "user name"
./.hidpi-disable
```
2.
Remove all injected display's DisplayVendorID folder under `Library/Displays/Contents/Resources/Overrides`
```bash
ls /Volumes/
rm -rf /Volumes/"Your System Disk Part"/Library/Displays/Contents/Resources/Overrides
```
## Inspired
https://www.tonymacx86.com/threads/solved-black-screen-with-gtx-1070-lg-ultrafine-5k-sierra-10-12-4.219872/page-4#post-1644805
https://github.com/syscl/Enable-HiDPI-OSX
================================================
FILE: hidpi.command
================================================
#!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
"$DIR/hidpi.sh"
================================================
FILE: hidpi.sh
================================================
#!/bin/bash
cat <//"))
if [[ "${#gDisplayInf[@]}" -ge 2 ]]; then
# Multi monitors detected. Choose target monitor.
echo ""
echo " "${langMonitors}" "
echo "--------------------------------------------------------"
echo " "${langIndex}" | "${langVendorID}" | "${langProductID}" | "${langMonitorName}" "
echo "--------------------------------------------------------"
# Show monitors.
for display in "${gDisplayInf[@]}"; do
let index++
MonitorName=("$(echo ${display:190:24} | xxd -p -r)")
VendorID=${display:16:4}
ProductID=${display:22:2}${display:20:2}
if [[ ${VendorID} == 0610 ]]; then
MonitorName="Apple Display"
fi
if [[ ${VendorID} == 1e6d ]]; then
MonitorName="LG Display"
fi
printf " %d | ${VendorID} | ${ProductID} | ${MonitorName}\n" ${index}
done
echo "--------------------------------------------------------"
# Let user make a selection.
read -p "${langChooseDis}: " selection
case $selection in
[[:digit:]]*)
# Lower selection (arrays start at zero).
if ((selection < 1 || selection > index)); then
echo "${langEnterError}"
exit 1
fi
let selection-=1
gMonitor=${gDisplayInf[$selection]}
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
else
gMonitor=${gDisplayInf}
fi
EDID=${gMonitor}
VendorID=$((0x${gMonitor:16:4}))
ProductID=$((0x${gMonitor:22:2}${gMonitor:20:2}))
Vid=($(printf '%x\n' ${VendorID}))
Pid=($(printf '%x\n' ${ProductID}))
# echo ${Vid}
# echo ${Pid}
# echo $EDID
}
# For Apple silicon there is no EDID. Get VID/PID in other way
function get_vidpid_applesilicon() {
local index=0
local prodnamesindex=0
local selection=0
# Apple ioreg display class
local appleDisplClass='AppleCLCD2'
# XPath as key.val
local value="/following-sibling::*[1]"
local get="/text()"
# XPath keys
local displattr="/key[.='DisplayAttributes']"
local prodattr="/key[.='ProductAttributes']"
local vendid="/key[.='LegacyManufacturerID']"
local prodid="/key[.='ProductID']"
local prodname="/key[.='ProductName']"
# VID/PID/Prodname
local prodAttrsQuery="/$displattr$value$prodattr$value"
local vendIDQuery="$prodAttrsQuery$vendid$value$get"
local prodIDQuery="$prodAttrsQuery$prodid$value$get"
local prodNameQuery="$prodAttrsQuery$prodname$value$get"
# Get VIDs, PIDs, Prodnames
# local vends=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$vendIDQuery"))
# local prods=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$prodIDQuery"))
local vends=($(ioreg -l | grep "DisplayAttributes" | sed -n 's/.*"LegacyManufacturerID"=\([0-9]*\).*/\1/p'))
local prods=($(ioreg -l | grep "DisplayAttributes" | sed -n 's/.*"ProductID"=\([0-9]*\).*/\1/p'))
set -o noglob
# IFS=$'\n' prodnames=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$prodNameQuery"))
IFS=$'\n' prodnames=($(ioreg -l | grep "DisplayAttributes" | sed -n 's/.*"ProductName"="\([^"]*\)".*/\1/p'))
set +o noglob
if [[ "${#prods[@]}" -ge 2 ]]; then
# Multi monitors detected. Choose target monitor.
echo ""
echo " "${langMonitors}" "
echo "------------------------------------------------------------"
echo " "${langIndex}" | "${langVendorID}" | "${langProductID}" | "${langMonitorName}" "
echo "------------------------------------------------------------"
# Show monitors.
for prod in "${prods[@]}"; do
MonitorName=${prodnames[$prodnamesindex]}
VendorID=$(printf "%04x" ${vends[$index]})
ProductID=$(printf "%04x" ${prods[$index]})
let index++
let prodnamesindex++
if [[ ${VendorID} == 0610 ]]; then
MonitorName="Apple Display"
# No name in prodnames variable for internal display
let prodnamesindex--
fi
if [[ ${VendorID} == 1e6d ]]; then
MonitorName="LG Display"
fi
printf " %-3d | ${VendorID} | %-12s | ${MonitorName}\n" ${index} ${ProductID}
done
echo "------------------------------------------------------------"
# Let user make a selection.
read -p "${langChooseDis}: " selection
case $selection in
[[:digit:]]*)
# Lower selection (arrays start at zero).
if ((selection < 1 || selection > index)); then
echo "${langEnterError}"
exit 1
fi
let selection-=1
dispid=$selection
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
else
# One monitor detected
dispid=0
fi
VendorID=${vends[$dispid]}
ProductID=${prods[$dispid]}
Vid=($(printf '%x\n' ${VendorID}))
Pid=($(printf '%x\n' ${ProductID}))
}
# init
function init() {
rm -rf ${currentDir}/tmp/
mkdir -p ${currentDir}/tmp/
libDisplaysDir="/Library/Displays"
targetDir="${libDisplaysDir}/Contents/Resources/Overrides"
sysDisplayDir="/System${targetDir}"
Overrides="\/Library\/Displays\/Contents\/Resources\/Overrides"
sysOverrides="\/System${Overrides}"
if [[ ! -d "${targetDir}" ]]; then
sudo mkdir -p "${targetDir}"
fi
downloadHost="https://raw.githubusercontent.com/xzhih/one-key-hidpi/master"
if [ -d "${currentDir}/displayIcons" ]; then
downloadHost="file://${currentDir}"
fi
DICON="com\.apple\.cinema-display"
imacicon=${sysOverrides}"\/DisplayVendorID\-610\/DisplayProductID\-a032\.tiff"
mbpicon=${sysOverrides}"\/DisplayVendorID\-610\/DisplayProductID\-a030\-e1e1df\.tiff"
mbicon=${sysOverrides}"\/DisplayVendorID\-610\/DisplayProductID\-a028\-9d9da0\.tiff"
lgicon=${sysOverrides}"\/DisplayVendorID\-1e6d\/DisplayProductID\-5b11\.tiff"
proxdricon=${Overrides}"\/DisplayVendorID\-610\/DisplayProductID\-ae2f\_Landscape\.tiff"
if [[ $is_applesilicon == true ]]; then
get_vidpid_applesilicon
else
get_edid
fi
# Check if monitor was found
if [[ -z $VendorID || -z $ProductID || $VendorID == 0 || $ProductID == 0 ]]; then
echo "$langNoMonitFound"
exit 2
fi
echo "$langMonitVIDPID $Vid:$Pid"
# Finally generate restore command
generate_restore_cmd
}
#
function generate_restore_cmd() {
if [[ $is_applesilicon == true ]]; then
cat >"$(cd && pwd)/.hidpi-disable" <<-\CCC
#!/bin/bash
function get_vidpid_applesilicon() {
local index=0
local prodnamesindex=0
local selection=0
# Apple ioreg display class
local appleDisplClass='AppleCLCD2'
# XPath as key.val
local value="/following-sibling::*[1]"
local get="/text()"
# XPath keys
local displattr="/key[.='DisplayAttributes']"
local prodattr="/key[.='ProductAttributes']"
local vendid="/key[.='LegacyManufacturerID']"
local prodid="/key[.='ProductID']"
local prodname="/key[.='ProductName']"
# VID/PID/Prodname
local prodAttrsQuery="/$displattr$value$prodattr$value"
local vendIDQuery="$prodAttrsQuery$vendid$value$get"
local prodIDQuery="$prodAttrsQuery$prodid$value$get"
local prodNameQuery="$prodAttrsQuery$prodname$value$get"
# Get VIDs, PIDs, Prodnames
local vends=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$vendIDQuery"))
local prods=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$prodIDQuery"))
set -o noglob
IFS=$'\n' prodnames=($(ioreg -arw0 -d1 -c $appleDisplClass | xpath -q -n -e "$prodNameQuery"))
set +o noglob
if [[ "${#prods[@]}" -ge 2 ]]; then
echo ' Monitors '
echo '------------------------------------'
echo ' Index | VendorID | ProductID '
echo '------------------------------------'
# Show monitors.
for prod in "${prods[@]}"; do
MonitorName=${prodnames[$prodnamesindex]}
VendorID=$(printf "%04x" ${vends[$index]})
ProductID=$(printf "%04x" ${prods[$index]})
let index++
let prodnamesindex++
if [[ ${VendorID} == 0610 ]]; then
MonitorName="Apple Display"
let prodnamesindex--
fi
printf " %d | ${VendorID} | ${ProductID} | ${MonitorName}\n" ${index}
done
echo "------------------------------------"
# Let user make a selection.
read -p "Choose the display:" selection
case $selection in
[[:digit:]]*)
if ((selection < 1 || selection > index)); then
echo "Enter error, bye"
exit 1
fi
let selection-=1
dispid=$selection
;;
*)
echo "Enter error, bye"
exit 1
;;
esac
else
# One monitor detected
dispid=0
fi
VendorID=${vends[$dispid]}
ProductID=${prods[$dispid]}
Vid=($(printf '%x\n' ${VendorID}))
Pid=($(printf '%x\n' ${ProductID}))
}
get_vidpid_applesilicon
CCC
else
cat >"$(cd && pwd)/.hidpi-disable" <<-\CCC
#!/bin/sh
function get_edid() {
local index=0
local selection=0
gDisplayInf=($(ioreg -lw0 | grep -i "IODisplayEDID" | sed -e "/[^<]*//"))
if [[ "${#gDisplayInf[@]}" -ge 2 ]]; then
echo ' Monitors '
echo '------------------------------------'
echo ' Index | VendorID | ProductID '
echo '------------------------------------'
for display in "${gDisplayInf[@]}"; do
let index++
printf " %d | ${display:16:4} | ${display:22:2}${display:20:2}\n" $index
done
echo '------------------------------------'
read -p "Choose the display: " selection
case $selection in
[[:digit:]]*)
if ((selection < 1 || selection > index)); then
echo "Enter error, bye"
exit 1
fi
let selection-=1
gMonitor=${gDisplayInf[$selection]}
;;
*)
echo "Enter error, bye"
exit 1
;;
esac
else
gMonitor=${gDisplayInf}
fi
EDID=$gMonitor
VendorID=$((0x${gMonitor:16:4}))
ProductID=$((0x${gMonitor:22:2}${gMonitor:20:2}))
Vid=($(printf '%x\n' ${VendorID}))
Pid=($(printf '%x\n' ${ProductID}))
}
get_edid
CCC
fi
cat >>"$(cd && pwd)/.hidpi-disable" <<-\CCC
# Check if monitor was found
if [[ -z $VendorID || -z $ProductID || $VendorID == 0 || $ProductID == 0 ]]; then
echo "No monitors found. Exiting..."
exit 2
fi
echo "Your monitor VID/PID: $Vid:$Pid"
rootPath="../.."
restorePath="${rootPath}/Library/Displays/Contents/Resources/Overrides"
echo ""
echo "(1) Disable HIDPI on this monitor"
echo "(2) Reset all settings to macOS default"
echo ""
read -p "Enter your choice [1~2]: " input
case ${input} in
1)
if [[ -f "${restorePath}/Icons.plist" ]]; then
${rootPath}/usr/libexec/plistbuddy -c "Delete :vendors:${Vid}:products:${Pid}" "${restorePath}/Icons.plist"
fi
if [[ -d "${restorePath}/DisplayVendorID-${Vid}" ]]; then
rm -rf "${restorePath}/DisplayVendorID-${Vid}"
fi
;;
2)
rm -rf "${restorePath}"
;;
*)
echo "Enter error, bye"
exit 1
;;
esac
echo "HIDPI Disabled"
CCC
chmod +x "$(cd && pwd)/.hidpi-disable"
}
# choose_icon
function choose_icon() {
rm -rf ${currentDir}/tmp/
mkdir -p ${currentDir}/tmp/
mkdir -p ${currentDir}/tmp/DisplayVendorID-${Vid}
curl -fsSL "${downloadHost}/Icons.plist" -o ${currentDir}/tmp/Icons.plist
echo ""
echo "-------------------------------------"
echo "|********** ${langChooseIcon} ***********|"
echo "-------------------------------------"
echo ""
echo "(1) iMac"
echo "(2) MacBook"
echo "(3) MacBook Pro"
echo "(4) LG ${langDisplay}"
echo "(5) Pro Display XDR"
echo "(6) ${langNotChange}"
echo ""
read -p "${langInputChoice} [1~6]: " logo
case ${logo} in
1)
Picon=${imacicon}
RP=("33" "68" "160" "90")
curl -fsSL "${downloadHost}/displayIcons/iMac.icns" -o ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.icns
;;
2)
Picon=${mbicon}
RP=("52" "66" "122" "76")
curl -fsSL "${downloadHost}/displayIcons/MacBook.icns" -o ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.icns
;;
3)
Picon=${mbpicon}
RP=("40" "62" "147" "92")
curl -fsSL "${downloadHost}/displayIcons/MacBookPro.icns" -o ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.icns
;;
4)
Picon=${lgicon}
RP=("11" "47" "202" "114")
cp ${sysDisplayDir}/DisplayVendorID-1e6d/DisplayProductID-5b11.icns ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.icns
;;
5)
Picon=${proxdricon}
RP=("5" "45" "216" "121")
curl -fsSL "${downloadHost}/displayIcons/ProDisplayXDR.icns" -o ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.icns
if [[ ! -f ${targetDir}/DisplayVendorID-610/DisplayProductID-ae2f_Landscape.tiff ]]; then
curl -fsSL "${downloadHost}/displayIcons/ProDisplayXDR.tiff" -o ${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}.tiff
Picon=${Overrides}"\/DisplayVendorID\-${Vid}\/DisplayProductID\-${Pid}\.tiff"
fi
;;
6)
rm -rf ${currentDir}/tmp/Icons.plist
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
if [[ ${Picon} ]]; then
DICON=${Overrides}"\/DisplayVendorID\-${Vid}\/DisplayProductID\-${Pid}\.icns"
/usr/bin/sed -i "" "s/VID/${Vid}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/PID/${Pid}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/RPX/${RP[0]}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/RPY/${RP[1]}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/RPW/${RP[2]}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/RPH/${RP[3]}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/PICON/${Picon}/g" ${currentDir}/tmp/Icons.plist
/usr/bin/sed -i "" "s/DICON/${DICON}/g" ${currentDir}/tmp/Icons.plist
fi
}
# main
function main() {
sudo mkdir -p ${currentDir}/tmp/DisplayVendorID-${Vid}
dpiFile=${currentDir}/tmp/DisplayVendorID-${Vid}/DisplayProductID-${Pid}
sudo chmod -R 777 ${currentDir}/tmp/
cat >"${dpiFile}" <<-\CCC
DisplayProductID
PID
DisplayVendorID
VID
IODisplayEDID
EDid
scale-resolutions
CCC
echo ""
echo "------------------------------------------"
echo "|********** "${langChooseRes}" ***********|"
echo "------------------------------------------"
echo ${langChooseResOp1}
echo ${langChooseResOp2}
echo ${langChooseResOp3}
echo ${langChooseResOp4}
echo ${langChooseResOp5}
echo ${langChooseResOp6}
echo ${langChooseResOpCustom}
echo ""
read -p "${langInputChoice}: " res
case ${res} in
1)
create_res_1 1680x945 1440x810 1280x720 1024x576
create_res_2 1280x800 1280x720 960x600 960x540 640x360
create_res_3 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 1680x945 1440x810 1280x720 1024x576 960x540 840x472 800x450 640x360
;;
2)
create_res_1 1680x945 1424x802 1280x720 1024x576
create_res_2 1280x800 1280x720 960x600 960x540 640x360
create_res_3 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 1680x945 1440x810 1280x720 1024x576 960x540 840x472 800x450 640x360
;;
3)
create_res_1 1680x1050 1440x900 1280x800 1024x640
create_res_2 1280x800 1280x720 960x600 960x540 640x360
create_res_3 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 1680x1050 1440x900 1280x800 1024x640 960x540 840x472 800x450 640x360
;;
4)
create_res_1 2560x1440 2048x1152 1920x1080 1760x990 1680x945 1440x810 1360x765 1280x720
create_res_2 1360x765 1280x800 1280x720 1024x576 960x600 960x540 640x360
create_res_3 960x540 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 2048x1152 1920x1080 1680x945 1440x810 1280x720 1024x576 960x540 840x472 800x450 640x360
;;
5)
create_res_1 3000x2000 2880x1920 2250x1500 1920x1280 1680x1050 1440x900 1280x800 1024x640
create_res_2 1280x800 1280x720 960x600 960x540 640x360
create_res_3 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 1920x1280 1680x1050 1440x900 1280x800 1024x640 960x540 840x472 800x450 640x360
;;
6)
# Scale factors
# res 1 scf: 1 1.25 1.3333 1.4545 1.7777 2
create_res_1 3440x1440 2752x1152 2580x1080 2365x990 1935x810 1720x720
# res 2 scf: 2 2.6666
create_res_2 1720x720 1290x540
# res 3 scf: 2.6666
create_res_3 1290x540
# res 4 scf: 1.25 1.3333 1.4545 1.7777 2 2.6666
create_res_4 2752x1152 2580x1080 2365x990 1935x810 1720x720 1290x540
;;
7)
custom_res
create_res_2 1360x765 1280x800 1280x720 960x600 960x540 640x360
create_res_3 840x472 800x450 720x405 640x360 576x324 512x288 420x234 400x225 320x180
create_res_4 1680x945 1440x810 1280x720 1024x576 960x540 840x472 800x450 640x360
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
cat >>"${dpiFile}" <<-\FFF
target-default-ppmm
10.0699301
FFF
/usr/bin/sed -i "" "s/VID/$VendorID/g" ${dpiFile}
/usr/bin/sed -i "" "s/PID/$ProductID/g" ${dpiFile}
}
# end
function end() {
sudo chown -R root:wheel ${currentDir}/tmp/
sudo chmod -R 0755 ${currentDir}/tmp/
sudo chmod 0644 ${currentDir}/tmp/DisplayVendorID-${Vid}/*
sudo cp -r ${currentDir}/tmp/* ${targetDir}/
sudo rm -rf ${currentDir}/tmp
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
echo "${langEnabled}"
echo "${langEnabledLog}"
}
# custom resolution
function custom_res() {
echo "${langCustomRes}"
read -p ":" input_resolutions
# Split the input into an array
IFS=' ' read -r -a resolution_array <<< "$input_resolutions"
# Call the create_res function with the array elements
create_res "${resolution_array[@]}"
}
# create resolution
function create_res() {
for res in $@; do
width=$(echo ${res} | cut -d x -f 1)
height=$(echo ${res} | cut -d x -f 2)
hidpi=$(printf '%08x %08x' $((${width} * 2)) $((${height} * 2)) | xxd -r -p | base64)
#
cat <>${dpiFile}
${hidpi:0:11}AAAAB
${hidpi:0:11}AAAABACAAAA==
OOO
done
}
function create_res_1() {
for res in $@; do
width=$(echo ${res} | cut -d x -f 1)
height=$(echo ${res} | cut -d x -f 2)
hidpi=$(printf '%08x %08x' $((${width} * 2)) $((${height} * 2)) | xxd -r -p | base64)
#
cat <>${dpiFile}
${hidpi:0:11}A
OOO
done
}
function create_res_2() {
for res in $@; do
width=$(echo ${res} | cut -d x -f 1)
height=$(echo ${res} | cut -d x -f 2)
hidpi=$(printf '%08x %08x' $((${width} * 2)) $((${height} * 2)) | xxd -r -p | base64)
#
cat <>${dpiFile}
${hidpi:0:11}AAAABACAAAA==
OOO
done
}
function create_res_3() {
for res in $@; do
width=$(echo ${res} | cut -d x -f 1)
height=$(echo ${res} | cut -d x -f 2)
hidpi=$(printf '%08x %08x' $((${width} * 2)) $((${height} * 2)) | xxd -r -p | base64)
#
cat <>${dpiFile}
${hidpi:0:11}AAAAB
OOO
done
}
function create_res_4() {
for res in $@; do
width=$(echo ${res} | cut -d x -f 1)
height=$(echo ${res} | cut -d x -f 2)
hidpi=$(printf '%08x %08x' $((${width} * 2)) $((${height} * 2)) | xxd -r -p | base64)
#
cat <>${dpiFile}
${hidpi:0:11}AAAAJAKAAAA==
OOO
done
}
# enable
function enable_hidpi() {
choose_icon
main
sed -i "" "/.*IODisplayEDID/d" ${dpiFile}
sed -i "" "/.*EDid/d" ${dpiFile}
end
}
# patch
function enable_hidpi_with_patch() {
choose_icon
main
version=${EDID:38:2}
basicparams=${EDID:40:2}
checksum=${EDID:254:2}
newchecksum=$(printf '%x' $((0x${checksum} + 0x${version} + 0x${basicparams} - 0x04 - 0x90)) | tail -c 2)
newedid=${EDID:0:38}0490${EDID:42:6}e6${EDID:50:204}${newchecksum}
EDid=$(printf ${newedid} | xxd -r -p | base64)
/usr/bin/sed -i "" "s:EDid:${EDid}:g" ${dpiFile}
end
}
# disable
function disable() {
echo ""
echo "${langDisableOpt1}"
echo "${langDisableOpt2}"
echo ""
read -p "${langInputChoice} [1~2]: " input
case ${input} in
1)
if [[ -f "${targetDir}/Icons.plist" ]]; then
sudo /usr/libexec/plistbuddy -c "Delete :vendors:${Vid}:products:${Pid}" "${targetDir}/Icons.plist"
fi
if [[ -d "${targetDir}/DisplayVendorID-${Vid}" ]]; then
sudo rm -rf "${targetDir}/DisplayVendorID-${Vid}"
fi
;;
2)
sudo rm -rf "${targetDir}"
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
echo "${langDisabled}"
}
#
function start() {
init
echo ""
let opt++; printf "${langEnableHIDPI}\n" $opt
if [[ $is_applesilicon == false ]]; then
let opt++; printf "${langEnableHIDPIEDID}\n" $opt
fi
let opt++; printf "${langDisableHIDPI}\n" $opt
echo ""
read -p "${langInputChoice} [1~$opt]: " input
if [[ $is_applesilicon == true ]]; then
case ${input} in
1)
enable_hidpi
;;
2)
disable
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
else
case ${input} in
1)
enable_hidpi
;;
2)
enable_hidpi_with_patch
;;
3)
disable
;;
*)
echo "${langEnterError}"
exit 1
;;
esac
fi
}
start