haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.82k stars 110 forks source link

Skip Display Check on MacOS m1 so custom comamnd can run regardlessly #137

Open lazywei opened 4 months ago

lazywei commented 4 months ago

This is based on https://github.com/haimgel/ddc-macos-rs/issues/2#issuecomment-1356873695. A futher improvement can be made to use m1ddc as external command to gather display info.

jglamine commented 3 months ago

Thanks, I was able to get it working on my m2 mac with this PR.

Instead of m1ddc I used Lunar (as I already have it installed) with this config:

usb_device = "1a40:0101"

on_usb_connect_execute = "lunar displays external input displayport1"
on_usb_disconnect_execute = "lunar displays external input hdmi1"