Last active
May 15, 2019 09:38
-
-
Save ThanosDi/085b89dd0cd87f1b7946eeb8c66ecae3 to your computer and use it in GitHub Desktop.
Turn off or on your second monitor. Second monitor assume its on the right of your main 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
#!/bin/bash | |
monitors=`xrandr --listactivemonitors | head -n1 | cut -d " " -f 2` | |
if [ "$monitors" == 1 ] | |
then | |
`xrandr --output DVI-I-1 --right-of DP-2 --auto` #change DVI-I-1 to your monitor connection running `xrandr` | |
else | |
`xrandr --output DVI-I-1 --off` #change DVI-I-1 to your monitor connection running `xrandr` | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment