You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
288 B

#!/bin/sh
# toggle external monitor
intern=LVDS-1
extern=HDMI-1
(xrandr | grep "$extern disconnected")
(xrandr --listactivemonitors | grep $extern) || (xrandr --output $extern --right-of $intern --auto & exit)
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off