Created
February 9, 2013 17:09
-
-
Save markstinson/4746100 to your computer and use it in GitHub Desktop.
script to change x11 scaling to fit on Dell Mini 9 screen
This file contains hidden or 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 | |
foo=`xrandr | grep LVDS` | |
lvds=`echo $foo | cut -d' ' -f1` | |
size=`echo $foo | cut -d' ' -f3` | |
if [ $1 ] | |
then | |
xrandr --output $lvds --mode 1024x600 --scale ${1}x${1} | |
elif [ $2 ] | |
then | |
xrandr --output $lvds --mode 1024x600 --scale ${1}x${2} | |
elif [ "$size" == "1024x600+0+0" ] | |
then | |
xrandr --output $lvds --mode 1024x600 --scale 1.15x1.15 | |
else | |
xrandr --output $lvds --mode 1024x600 --scale 1x1 | |
fi | |
echo Previous scaled resolution: $size | |
# To find out your modes and such | |
# | |
# run: cvt 1920 1080 # enter in the Width and Height you want (1440 900, 1366 768, whatever) | |
# # (outputs) | |
# # 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz | |
# Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync | |
# | |
# run: cvt 1920 1080 # enter in the Width and Height you want (1440 900, 1366 768, whatever) | |
# # (outputs) | |
# # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz | |
# Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync | |
# | |
# run: xrandx # note what the external display is called. For my setup, it's called: VGA . Use that in the following commands |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment