Friday, June 6, 2008

Quickswitch - ATI FGLRX manipulation utility

Recently, I've started moving my computer around a lot more connecting and disconnecting it from the monitor constantly. I wanted an easy method of switching from my laptop display to my LCD monitor and back quickly. With that goal in mind I started googling which before long left me realizing that many other people had the same desire, but there wasn't really any easy way to "make it so". Digging into the device driver for my card (an ATI Xpress 200) I figured out that I can make the display shift from monitor to laptop display with one command:

aticonfig--enable-monitor=X

The supported modes(X) for the FGLRX driver are defined as follows:
  • CRTmonitors (tube) 1 and 2 (CRT1,CRT2)
  • LaptopDisplay (LVDS)
  • Television (TV)
  • HDMI (LCD)1 and 2 (LVDS1, LVDS2)
In the future I'd like to completely automate this process, but for now I have created a script that detects and switches screens and resolutions. Today, it must be configured for both screens and resolutions.

To configure it, edit it with your favorite editor:

vi quickswitch.pl

Change the following variables to match your configuration:
  • $default{'monitor'}
  • $default{'resolution'}
  • $alternate{'monitor'}
  • $alternate{'resolution'}
Save your changes, and place it or a link to it in a directory that is accessible in your path:

sudo mv

quickswitch.pl/usr/bin


Once you have completed this step, create a shortcut to it or if you are using the GNOME desktop; create a shortcut to it:

gconf-editor

Expand:

Apps\Metacity\Global_Keybindings

Open:

run_command_1

Set it to something like:

F8

Expand:

Apps\Metacity\Keybinding_Commands

Open:

command_1

Set it to:

/path/to/your/quickswitch.pl

Close gconf-editor. Test your new command by holding control-shift and pressing the F8 key.

Download Quickswitch - [HERE]

0 comments: