orientation switcher for computer monitor

I use a TV for a computer monitor, and I switch it from portrait to landscape depending on what im doing(eg coding, vs watching a movie). I want to hook my arduino up to a gyroscope or something similar to detect its orientation and then via usb activate a program i'll write for my pc to change the display settings for that monitor. I just need some help for a few things,
1.) how would I use an arduino to communicate with my computer in this way
2.)can anyone point me in the direction of a single axis acceleromator for detecting orientation

thanks in advance for any advice or help!

This demo illustrates how to communicate with a PC using Python.

...R

2.)can anyone point me in the direction of a single axis acceleromator for detecting orientation

Not sure if there is any point getting a single axis accelerometer, and anyway, you probably need a gyro and not an accelerometer

Try using one of these

http://www.ebay.com/itm/1PC-9DOF-MPU-9150-9-Axis-Accelerometer-Gyroscope-Magnetic-Field-Sensor-Moudle-/251347590357?pt=LH_DefaultDomain_0&hash=item3a857bdcd5