As some of you may know, I run am running Arch Linux on my Lenovo T420. Being a programmer, I often use a second monitor. It took me a little while to figure out how to get this auto-configured on boot in Arch, but I've come up with the following script.
This script will autodetect if you have a secondary monitor (in my case VGA1) connected to your laptop. And set it up your screens accordingly using xrandr.
To get it to run at boot, I simply include it in my .xinitrc file in my home directory.
Feel free to use the script, although you may have to change the screens accordingly.