Using xbacklight backlight of laptop can be controlled.
So, there are multiple techniques to do it:
Simplest
[shell]
xbacklight -set
Smart
[.bashrc]
alias b='xbacklight -set'
[shell]
b
Over smart
[.bashrc]
# backlight function
backlight() {
# take argument and put it as backlight settings
param=$(echo "$1")
echo "$param"
if [ -z "$param" ]; then
echo "Required parameter missing, enter value between 1 to 100"; return
else
if [ "$param" -ge "1" ]; then
if [ "$param" -le "100" ]; then
xbacklight -set $param
echo "xbacklight -set $param"
else
echo "Parameter out of range, enter value between 1 to 100"; return
fi
else
echo "Parameter out of range, enter value between 1 to 100"; return
fi
fi
}
alias b=backlight
[shell]
b
Comments
Post a Comment