add
This commit is contained in:
1 parent
bd49911eca
commit
e3de01bde8
3742 files changed
+64316
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/backlight/apple-panel-bl/subsystem/apple-panel-bl/max_brightness)
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
dim=$1
|
||||
else
|
||||
dim=10
|
||||
fi
|
||||
next=$(expr $(cat /sys/class/backlight/apple-panel-bl/subsystem/apple-panel-bl/brightness) - $max '*' "$dim" '/' 100)
|
||||
if [ -z "$next" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
if [ $next -lt 0 ]
|
||||
then
|
||||
next=0
|
||||
fi
|
||||
echo $next > /sys/class/backlight/apple-panel-bl/subsystem/apple-panel-bl/brightness
|
||||
echo $(expr $next "*" 100 "/" $max)
|
||||
@@ -0,0 +1 @@
|
||||
{"version":1,"resource":"file:///home/jvj/script/dim_lum.sh","entries":[{"id":"R26m.sh","timestamp":1724450344980}]}
|
||||
Reference in new issue
Block a user