21 lines
286 B
Bash
Executable file
21 lines
286 B
Bash
Executable file
#!/bin/bash
|
|
FILE=/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness
|
|
INC=1
|
|
VAL=255
|
|
while true; do
|
|
VAL=$(($VAL + $INC))
|
|
echo $VAL > $FILE
|
|
if [ $VAL -lt 1 ]; then
|
|
INC=1
|
|
fi;
|
|
|
|
if [ $VAL -gt 4434 ]; then
|
|
INC=-1
|
|
fi;
|
|
|
|
echo $INC
|
|
echo $VAL
|
|
|
|
|
|
done
|
|
|