Putting on your sunglasses could be as simple as flipping a switch.