This is a software to extand the capabilities of a USB Switch Hub. It use the protocol DDC/CI to change the input of my monitor. I'm using the UGREEN Switch USB 3.0
Last active
June 4, 2024 14:10
-
-
Save r0xsh/8dbaf16231ad01028a255bd80bcbd7f9 to your computer and use it in GitHub Desktop.
Software KVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="remove", SUBSYSTEM=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="0610", RUN+="switch_screen.sh pc" | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="0610", RUN+="switch_screen.sh laptop" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env sh | |
PORT=8 | |
PC=0x0f | |
LAPTOP=0x11 | |
function switch_screen { | |
nohup ddcutil -b $PORT setvcp 60 $1 --noverify &>/dev/null & | |
} | |
case "$1" in | |
laptop) switch_screen $LAPTOP ;; | |
pc) switch_screen $PC ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment