diff --git a/bin/bin/disconnect-internal-monitor.sh b/bin/bin/disconnect-internal-monitor.sh new file mode 100755 index 0000000..3cb62ac --- /dev/null +++ b/bin/bin/disconnect-internal-monitor.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +intern=eDP-1-1 +extern=HDMI-0 + +if xrandr | grep "$extern disconnected"; then + xrandr --output "$extern" --off --output "$intern" --auto + echo "External Monitor $extern is disconnected" +else + xrandr --output "$intern" --off --output "$extern" --auto + echo " External Monitor $extern is connected" + echo "So, Internal Monitor $intern was shutdown" +fi