mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-14 04:59:36 +01:00
26 lines
372 B
Bash
26 lines
372 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
|
||
|
|
||
|
brightness=`cat /sys/class/leds/asus::kbd_backlight/brightness`
|
||
|
max=3
|
||
|
min=0
|
||
|
|
||
|
|
||
|
if [ "$1" == "inc" ]; then
|
||
|
|
||
|
brightness=`expr $brightness + 1`
|
||
|
else
|
||
|
brightness=`expr $brightness - 1`
|
||
|
fi
|
||
|
|
||
|
if [ $brightness -gt 3 ]; then
|
||
|
brightness=3
|
||
|
fi
|
||
|
|
||
|
if [ $brightness -lt 0 ]; then
|
||
|
brightness=0
|
||
|
fi
|
||
|
|
||
|
echo $brightness > /sys/class/leds/asus::kbd_backlight/brightness
|