dotfiles/Utils/sleep.sh

22 lines
286 B
Bash
Raw Normal View History

2013-11-07 14:49:29 +00:00
#!/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