Created
July 7, 2020 19:21
-
-
Save bremme/c2fb0b9378d3dc05404aa8840b421a40 to your computer and use it in GitHub Desktop.
Switch between triple monitors and single monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ $1 == "on" ]]; then | |
# Turn on all three monitors and make 2nd primary | |
xrandr --output DP-2 --auto --primary | |
xrandr --output DP-0 --auto --left-of DP-2 | |
xrandr --output DP-4 --auto --right-of DP-2 | |
elif [[ $1 == "off" ]]; then | |
# Turn all three monitors off and make 3rd primary | |
xrandr --output DP-0 --off | |
xrandr --output DP-2 --off | |
xrandr --output DP-4 --auto --primary | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment