Subversion Repositories oBacklight

Compare Revisions

Ignore whitespace Rev 1 → Rev 2

/tags/oBacklight 0.3.1/src/changelog.txt
0,0 → 1,16
oBacklight Version 0.3.1 (2010-06-15)
===============================================
Changes:
* Added license file.
Bugs:
* None at this time.
 
oBacklight Version 0.3 (2010-05-01)
===============================================
Features:
* Backlight functionality for Sony Laptops
in combination with nvidia_bl driver.
Tested with Sony VAIO VPCCW1S1E.
Bugs:
* None at this time.
/tags/oBacklight 0.3.1/src/license.txt
0,0 → 1,20
Copyright (c) 2010, oSource Development
 
All rights reserved.
 
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution.
 
* Neither the name of the oSource Development nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/tags/oBacklight 0.3.1/src/oBacklight.sh
0,0 → 1,78
#!/bin/bash
 
#####################################################
# Simple script to catch the changes to backlight #
# events on sony laptops in combination with #
# nvidia_bl. #
# #
# Tested with a Sony Vaio VPCCW1S1E Laptop. #
# #
# This has been tested on openSUSE 11.2 but #
# should work on any distributions. #
# #
# Released under the BSDL Licens #
# #
# Author: Marcus Udenhed #
# Version: 0.3 #
# Last Modified 2010-05-01 14:30 #
# #
#####################################################
 
### BEGIN INIT INFO
# Provides: Sony Backlight
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Provides connector for nvidia_bl
# Description: Provides a connector between the
# standard Sony backlight interface and nvidia_bl
# interface. Captures all backlight events from
# /sys/class/backlight/sony.
### END INIT INFO
 
start() {
 
/etc/init.d/oBacklight.sh run &
 
}
 
stop() {
 
killall -r oBacklight
 
}
 
run() {
 
DVAR=$(cat /sys/class/backlight/sony/brightness)
 
while [ exit != 130 ]
do
 
sleep 1
 
GVAR=$(cat /sys/class/backlight/sony/brightness)
 
if [ "$GVAR" != "$DVAR" ]
then
echo $GVAR > /sys/class/backlight/nvidia_backlight/brightness
DVAR=$(cat /sys/class/backlight/sony/brightness)
fi
 
done
 
}
 
case $1 in
start)
start
;;
stop)
stop
;;
run)
run
;;
*)
echo "start|stop|run"
;;
esac
/tags/oBacklight 0.3.1/src/readme.txt
0,0 → 1,32
oBacklight
==========
 
Simple script to catch the changes to backlight events on Sony laptops in
combination with the nvidia_bl found here: http://www.nvnews.net/vbulletin/showthread.php?t=143025
 
Tested with a Sony Vaio VPCCW1S1E Laptop.
 
This has been tested on openSUSE 11.2 but should work on any distributions.
 
Features:
* Backlight functionality for Sony Laptops
in combination with nvidia_bl driver.
Tested with Sony VAIO VPCCW1S1E.
 
Requirements:
* nvidia_bl (http://www.nvnews.net/vbulletin/showthread.php?t=143025)
 
Installation:
1. Copy the script to /etc/init.d/
$ sudo cp oBacklight.sh /etc/init.d/
 
2. Add script to your startup sequence.
This how you do it in openSUSE.
$ sudo yast runlevel add service=oBacklight.sh
 
3. To start the script either reboot your computer or start the script like this.
$ sudo /etc/init.d/oBacklight.sh start
 
 
================================================================
Visit us at http://dev.osource.se/ for support and bug reporting