4f1d3ec4c000874944e4730f00a2530d231fb99e
5 MAIN
=$
(xrandr |
grep eDP | cut
-f1 -d" ")
6 if [ "${MAIN}" = "" ]; then
7 echo "Could not find main display."
11 OTHER
=$
(xrandr |
grep "\<connected\>" |
grep -v eDP | cut
-f1 -d" ")
12 if [ "${OTHER}" = "" ]; then
13 echo "Could not find external display."
17 echo "Set ${MAIN} as mirror of ${OTHER}"
19 xrandr
--output ${OTHER} --auto --output ${MAIN} --same-as ${OTHER} --primary