mirror of
https://github.com/xzhih/one-key-hidpi.git
synced 2026-04-13 09:23:40 +08:00
Merge pull request #8 from boboidream/master
[!] 修复 macOS 10.13.6 下不能获取到 VendorID,ProductID,EDID 问题
This commit is contained in:
@@ -16,9 +16,9 @@ cat << EEF
|
||||
============================================
|
||||
EEF
|
||||
#
|
||||
VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $8}')
|
||||
ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $8}')
|
||||
EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $8}' | sed -e 's/.$//' -e 's/^.//')
|
||||
VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $NF}')
|
||||
ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $NF}')
|
||||
EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $NF}' | sed -e 's/.$//' -e 's/^.//')
|
||||
|
||||
Vid=$(echo "obase=16;$VendorID" | bc | tr 'A-Z' 'a-z')
|
||||
Pid=$(echo "obase=16;$ProductID" | bc | tr 'A-Z' 'a-z')
|
||||
|
||||
6
hidpi.sh
6
hidpi.sh
@@ -16,9 +16,9 @@ cat << EEF
|
||||
============================================
|
||||
EEF
|
||||
#
|
||||
VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $8}')
|
||||
ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $8}')
|
||||
EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $8}' | sed -e 's/.$//' -e 's/^.//')
|
||||
VendorID=$(ioreg -l | grep "DisplayVendorID" | awk '{print $NF}')
|
||||
ProductID=$(ioreg -l | grep "DisplayProductID" | awk '{print $NF}')
|
||||
EDID=$(ioreg -l | grep "IODisplayEDID" | awk '{print $NF}' | sed -e 's/.$//' -e 's/^.//')
|
||||
|
||||
Vid=$(echo "obase=16;$VendorID" | bc | tr 'A-Z' 'a-z')
|
||||
Pid=$(echo "obase=16;$ProductID" | bc | tr 'A-Z' 'a-z')
|
||||
|
||||
Reference in New Issue
Block a user