Created
March 12, 2014 18:44
-
-
Save cuadue/9513604 to your computer and use it in GitHub Desktop.
Set the X11 resolution
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/bash | |
# For example, to set 1920x1080 at 60Hz: | |
# . 1920 1080 60 | |
MODE=$(cvt $* | tail -n1) | |
NAME=$(echo $MODE | cut -d' ' -f2 | sed 's/"//g') | |
MODELINE=$(echo $MODE | cut -d' ' -f3-) | |
xrandr --newmode "$NAME" $MODELINE > /dev/null 2>&1 | |
xrandr --addmode VBOX0 $NAME > /dev/null 2>&1 | |
xrandr --output VBOX0 --mode $NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment