سلام
من یه اسکریپت نوشتم که این اررور رو میده(SOLVED) :
/usr/bin/adjust-brightness: line 74: syntax error: unexpected end of file[SOLVED]
دوم اینکه فقط برای ATI نوشتم . خوشحال میشم که کمکم کنید برای NVidia هم کار کنه
ممنون
متن اسکریپت :
#!/bin/sh
# Some user-defined values
GRANULARITY=27 # The approximate number of possible brightness positions allowed
FONTSIZE=70 # The size of font used by the OSD display
# Fontsize often needs to change when granularity changes
# Pull the numerical limit from the Mixer
if which xbacklight
then
LIMIT=100
b=`xbacklight -get`
brightval=${b/\.*}
case "$1" in
up)
xbacklight -set $(( $brightval + 20 ));;
down)
xbacklight -set $(( $brightval - 10 ));;
*)
if [ $brightval -gt 90 ]; then xbacklight -set 0; else xbacklight -set 100; fi;;
esac
else if which aticonfig
then
LIMIT=100
brightval=`aticonfig --query-dispattrib=lvds,brightness|grep value|awk '{print $2}'|tr -d '[A-Za-z:,]'`
case "$1" in
up)
if [ 90 -gt $brightval ]; then aticonfig --set-dispattrib=lvds,brightness:$(($brightval + 10)); fi;;
down)
if [ $brightval -gt -90 ]; then aticonfig --set-dispattrib=lvds,brightness:$(($brightval - 10)); fi;;
*)
if [ $brightval -eq 0 ]; then aticonfig --set-dispattrib=lvds,brightness:-80; else aticonfig --set-dispattrib=lvds,brightness:0; fi;;
esac
if [ $brightval -lt -79 ]; then
OSDCOLOR=purple; else
OSDCOLOR=yellow
fi
else
LIMIT=10
brightval=`cat /sys/devices/virtual/backlight/acpi_video0/brightness`;
case "$1" in
up)
if [ 8 -gt $brightval ]; then echo $(($brightval + 1)) > /sys/devices/virtual/backlight/acpi_video0/brightness; fi;;
down)
if [ $brightval -gt 0 ]; then echo $(($brightval - 1)) > /sys/devices/virtual/backlight/acpi_video0/brightness; fi;;
*)
if [ $brightval -eq 0 ]; then echo "6" > /sys/devices/virtual/backlight/acpi_video0/brightness; else echo "0" > /sys/devices/virtual/backlight/acpi_video0/brigh$
esac
if [ $brightval -eq "0" ]; then
OSDCOLOR=purple; else
OSDCOLOR=yellow
fi
fi fi
let volcounter=brightval*GRANULARITY/LIMIT
if [ $volcounter -gt $GRANULARITY ]; then
volcounter=$GRANULARITY
fi
OSDI=""
while [ $volcounter -gt 0 ]
do
OSDI=`echo $OSDI"I"`
let volcounter=volcounter-1
done
# Clean up any running aosd_cat processes
killall aosd_cat &> /dev/null
# Display the "I" bar
echo "Brightness : $OSDI" | aosd_cat -n "Arial Black $FONTSIZE" -u 1000 -o 200 -R $OSDCOLOR -S none -f 0 -y -10
# END
-------پی نوشت--------
با تشکر از دوستان حل شد. فقط برای NVIDIA یکی کمک کنه ممنون میشم.