Closed nathang21 closed 4 years ago
Reproduce/Error
➜ bin pwd /usr/local/bin ➜ bin ./display_switch 2020-09-07 13:23:21.912 Initializing Fatal error: Error raised at top level: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "monitorInput", intValue: nil)], debugDescription: "Cannot initialize InputSource from invalid String value DisplayPort-1", underlyingError: nil)): file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1103.8.25.8/swift/stdlib/public/core/ErrorType.swift, line 200 [1] 22694 illegal hardware instruction ./display_switch
.ini file
➜ bin cat ~/Library/Preferences/display-switch.ini usb_device = "8086:a36d" monitor_input = "DisplayPort-1"
Steps taken:
I fixed by modifying the .ini file to reference DisplayPort1
DisplayPort1
Reproduce/Error
.ini file
Steps taken: