概述
新建三个文本文件并给予执行权限:
up.sh
if [ ! -w /sys/class/backlight/intel_backlight/brightness ];then
echo "password" | sudo -S chmod 777 /sys/class/backlight/intel_backlight/brightness
fi
read bright < '/sys/class/backlight/intel_backlight/brightness'
v=600
v=$((4882 / 20 + $bright))
if [ $v -gt 4882 ]; then
v=4882
fi
echo $v | tee /sys/class/backlight/intel_backlight/brightness
down.sh
if [ ! -w /sys/class/backlight/intel_backlight/brightness ];then
echo "password" | sudo -S chmod 777 /sys/class/backlight/intel_backlight/brightness
fi
read bright < '/sys/class/backlight/intel_backlight/brightness'
v=600
v=$(($bright - 4882 / 9 ))
echo $v | tee /sys/class/backlight/intel_backlight/brightness
middle.sh Linux学习,http:// linux.it.net.cn
echo 2441 > /sys/class/backlight/intel_backlight/brightness
使用方法: 提高亮度: sudo ./up.sh 降低亮度: sudo ./down.sh 直接调节亮度到50%: sudo ./middle.sh
最后
以上就是冷艳吐司为你收集整理的linux亮度调节程序,linux调节屏幕亮度的全部内容,希望文章能够帮你解决linux亮度调节程序,linux调节屏幕亮度所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复