oups
This commit is contained in:
1 parent
9eb6226619
commit
06f5b28291
26 files changed
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
#augmente la luminosité de arg%, 10% si non spécifié
|
||||
#retourne le % de luminosité en fin de commande
|
||||
|
||||
max=$(cat /sys/class/leds/kbd_backlight/max_brightness)
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
dim=$1
|
||||
else
|
||||
dim=10
|
||||
fi
|
||||
next=$(expr $(cat /sys/class/leds/kbd_backlight/brightness) - $max '*' "$dim" '/' 100)
|
||||
if [ -z "$next" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
if [ $next -lt 0 ]
|
||||
then
|
||||
next=0
|
||||
fi
|
||||
echo $next > /sys/class/leds/kbd_backlight/brightness
|
||||
echo $(expr $next "*" 100 "/" $max)
|
||||
Reference in new issue
Block a user