rendered paste body#!/bin/bash
CurrentValue=`cat /proc/acpi/video/VGA/LCD/brightness | tail -1 | cut -d" " -f2`
Set1=12
Set2=25
Set3=37
Set4=50
Set5=62
Set6=75
Set7=87
if [ $CurrentValue = "0" ]; then
echo "Brightness is a Low as it gets, you want a black screen?"
elif [ $CurrentValue = $Set1 ]; then
echo "Brightness is at 1 unable to make dimmer"
elif [ $CurrentValue == $Set2 ]; then
echo "Changing to Brightness 1"
echo $Set1 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == $Set3 ]; then
echo "Chaning to Brightness 2"
echo $Set2 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == $Set4 ]; then
echo "Chaning to Brightness 3"
echo $Set3 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == $Set5 ]; then
echo "Chaning to Brightness 4"
echo $Set4 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == $Set6 ]; then
echo "Chaning to Brightness 5"
echo $Set5 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == $Set7 ]; then
echo "Changing Brightness to 6"
echo $Set6 > /proc/acpi/video/VGA/LCD/brightness
elif [ $CurrentValue == "100" ]; then
echo "Changing Brightness to 6"
echo $Set6 > /proc/acpi/video/VGA/LCD/brightness
else
echo "UnKnown error..."
fi