Last active
November 27, 2016 16:42
-
-
Save Tafhim/ee073f6cd978a32df86da5e408b4181e to your computer and use it in GitHub Desktop.
You can link this to your /usr/local/bin and call it like "reset_display left", "reset_display right" or simply "reset_display"
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 | |
left_display="eDP1" | |
right_display="HDMI2" | |
if [ $1 = "left" ] | |
then | |
xrandr --output $left_display --mode 1366x768 --output $right_display --off | |
elif [ $1 = "right" ] | |
then | |
xrandr --output $left_display --off --output $right_display --mode 1920x1080 | |
elif [ $1 = "both" ] | |
then | |
xrandr --output $left_display --mode 1366x768 --output $right_display --mode 1920x1080 --right-of $left_display | |
else | |
xrandr --output $left_display --mode 1366x768 --output $right_display --mode 1920x1080 --same-as $left_display | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment