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 | |
#Author: Travis Gibson | |
#This script requires an argument for the resolution width | |
#Thanks go out to eCharles for a patch in the comments of this link here: http://blog.echarles.net/2013/10/01/Ubuntu-13.04-On-MacbookPro-Retina | |
#Get connected adapter | |
adapter=$(xrandr -q | grep "connected" | cut -d " " -f 1) | |
if [ -z "$adapter" ]; then | |
echo "Connected adapter not found. Check xrandr -q." | |
#Exit if no adapter is connected |