[ltp] T41p/T42p/R50p VGA and DVI Out

Dave Hansen linux-thinkpad@linux-thinkpad.org
Mon, 09 Jan 2006 14:14:54 -0800


On Thu, 2006-01-05 at 14:44 -0500, Carlos wrote:
> On Thu, 2006-01-05 at 01:22 -0800, Dave Hansen wrote:
> > #!/bin/bash
> > # /etc/acpi/ibm-thinkpad-fn-f7.sh
> >  . /etc/default/acpi-support
> >  . /usr/share/acpi-support/power-funcs
> >  . /usr/share/acpi-support/device-funcs
> > 
> 
> Mhh.. what do these do? Where did you get them from?

They're in a normal Ubuntu 5.10 install.

> > DeviceConfig;
> > function xrandr_reslines
> > {
> >         xrandr | grep '^[ \*][0-9][0-9]*'
> > }
> > RES_NR="$(xrandr_reslines | grep -n ^\* | awk -F: '{print $1}')"
> > NR_RESES="$(xrandr_reslines | wc -l)"
> > 
> > TARGET_RESLINE="$(xrandr_reslines | head -$((RES_NR%NR_RESES + 1)) | tail -1)"
> > # resline format is like this:
> > #  1   1400 x 1050   ( 542mm x 406mm )   0
> > #echo resline: "$TARGET_RESLINE"
> > TARGET_RES="$(echo "$TARGET_RESLINE" | awk '{print $2$3$4}')"
> > xrandr --size $TARGET_RES
> > 
> > 
> 
> What about this? Is this part of a script? (sorry about the ignorance)

Yup, all part of the script.

-- Dave