From 5f316de0e3fb8d08dab8af0f6ca82eb4e2a320a4 Mon Sep 17 00:00:00 2001 From: Flinner Yuu Date: Thu, 14 Jul 2022 13:51:32 +0300 Subject: [PATCH] feat: starting nvidia manages external <-> internal montior --- bin/bin/disconnect-internal-monitor.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/bin/disconnect-internal-monitor.sh 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