Created
July 11, 2020 20:14
-
-
Save ayush--s/69e4c7e55fc35ee5f2e094c997da9a2d to your computer and use it in GitHub Desktop.
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 | |
intern=LVDS-1 | |
extern=HDMI-1 | |
if xrandr | grep "$extern disconnected"; then | |
xrandr --output "$extern" --off --output "$intern" --auto | |
else | |
xrandr --output "$intern" --off --output "$extern" --auto | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment