Some utils
This commit is contained in:
parent
fd53f512ef
commit
60e0ec1df7
3 changed files with 29 additions and 1 deletions
|
@ -10,4 +10,4 @@ echo off > /proc/acpi/ibm/light
|
|||
sleep 0.2
|
||||
echo on > /proc/acpi/ibm/light
|
||||
sleep 0.2
|
||||
echo off > /proc/acpi/ibm/light
|
||||
|
||||
|
|
21
Utils/sleep.sh
Executable file
21
Utils/sleep.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/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
|
||||
|
|
@ -1,4 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
BEFORE=`xbacklight`
|
||||
xbacklight -set 0 -time 0 -steps 1
|
||||
sleep 0.1
|
||||
xbacklight -set $BEFORE -time 0 -steps 1
|
||||
|
||||
exit
|
||||
LIGHT=/sys/class/leds/tpacpi\:\:thinklight/brightness
|
||||
STATE=`cat $LIGHT`
|
||||
INVERSE=`echo 255-$STATE | bc -l`
|
||||
|
|
Loading…
Reference in a new issue