Show pagesourceBack to top Share via Share via... Twitter LinkedIn Telegram Yammer RedditRecent ChangesSend via e-MailPrintPermalink × Script snippets Switch Monitor switch-monitors.sh CURRENT_OUTPUT=`ddccontrol -r 0x60 dev:/dev/i2c-5 | sed -n 's|.*0x60: +/\([0-9]\+\)/15.*|\1|p'` if [ $CURRENT_OUTPUT = 3 ] then # switch to first input ddccontrol -r 0x60 -w 15 dev:/dev/i2c-5 else # switch to second input ddccontrol -r 0x60 -w 3 dev:/dev/i2c-5 fi Last modified: 2019-12-20 14:21