Update monitor setup and switching

This commit is contained in:
LordMathis
2019-02-05 20:31:53 +01:00
parent d097818be3
commit 4fc2bcab0a
5 changed files with 51 additions and 15 deletions

View File

@@ -2,8 +2,8 @@
intern=eDP-1
extern=HDMI-1
if xrandr | grep "$extern disconnected"; then
xrandr --output "$extern" --off --output "$intern" --auto
if xrandr --listactivemonitors | grep "$intern"; then
xrandr --output "$intern" --off
else
xrandr --output "$intern" --off --output "$extern" --auto
xrandr --output "$intern" --auto
fi