3个版本 (破坏性更新)
0.3.0 | 2023年11月28日 |
---|---|
0.2.0 | 2021年7月5日 |
0.1.0 | 2021年7月5日 |
#564 在 硬件支持
10KB
220 行
brack
调整背光!
Change backlight brightness
brack [device] [change]
device (optional) the device to change backlight on (see /sys/class/backlight)
change (optional) absolute value in percent or change in percent prefixed with +/-.
no change will display current value.
no device will try to automatically determine device.
Examples:
brack +10 # increase brightness with 10%
brack -10 # decrease brightness with 10%
brack 50 # set brightness to 50%
brack intel_backlight +10 # increase brightness with 10% on the intel_backlight device
用户访问背光
将 <vendor>
替换为 /sys/class/blacklight 中的名称,例如 acpi_video0
,并添加一个 udev规则,例如: /etc/udev/rules.d/backlight.rules
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<vendor>", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<vendor>", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
并确保您将用户添加到 video
组
$ sudo gpasswd -a $USER video
依赖项
~180KB