21 lines
380 B
Bash
Executable File
21 lines
380 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
CMD="brightnessctl set"
|
|
STATUS=$(brightnessctl g)
|
|
|
|
if [ $1 = 'd' ]; then
|
|
if [ $STATUS -le 11 ]; then
|
|
bash -c "$CMD 1"
|
|
elif [ $STATUS -le 51 ]; then
|
|
bash -c "$CMD 10-"
|
|
else
|
|
bash -c "$CMD 50-"
|
|
fi
|
|
elif [ $1 = 'u' ]; then
|
|
if [ $STATUS -lt 51 ]; then
|
|
bash -c "$CMD +10"
|
|
else
|
|
bash -c "$CMD +50"
|
|
fi
|
|
fi
|