Disable MSI monitor driver drive for Macos/Linux

 Shell script

#!/bin/bash

DEV_DESP="MS MSI Gaming Controller"

UHUB_CMD="/opt/homebrew/bin/uhubctl -s \"$DEV_DESP\""

DEV_USB_INFO=`eval "$UHUB_CMD"`


LOCATION=`echo $DEV_USB_INFO | sed 's/^.*\([0-9]-[0-9]\).*$/\1/'`

PORT=`echo $DEV_USB_INFO | sed 's/^.*\] Port \([0-9]\).*$/\1/' `

echo Target Device: $DEV_DESP


if [ -z "$LOCATION"  ] || [ -z "$PORT" ]; then

  echo "Device cannot be found."

  exit 0

fi


echo Location: $LOCATION

echo Port: $PORT


UHUB_ACT_CMD="/opt/homebrew/bin/uhubctl -a off -l $LOCATION -p $PORT"

echo Running cmd: $UHUB_ACT_CMD

eval $UHUB_ACT_CMD

评论

此博客中的热门博文

Openwrt路由器上配置shadowsocks透明代理+gfwlist(PAC)

Configure shadowsocks transparent proxy + gfwlist(PAC) on OpenWRT Router

Configure V2Ray(Shadowsocks mode) + 加速:普通BBR/魔改BBR on KVM VPS (Tested on Ubuntu 16.04)