From e7c48367e88d09d4d31f5326b5ccc03290ed61dc Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 2 Sep 2021 22:49:04 +0800 Subject: [PATCH] feat: display udev rules for laptop backlight --- gui/sysutils.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gui/sysutils.sh b/gui/sysutils.sh index d391f04..c939c1c 100755 --- a/gui/sysutils.sh +++ b/gui/sysutils.sh @@ -80,3 +80,14 @@ sudo systemctl start autorandr lnsf "$DIR/dunst/dunstrc" "$XDG_CONFIG_HOME/dunst/dunstrc" lnsf "$DIR/thunar/uca.xml" "$XDG_CONFIG_HOME/Thunar/uca.xml" + +echo for non-root user to change backlight, add following rule to /etc/udev/rules.d/backlight.rules +echo ``` +echo ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", GROUP="video", MODE="0664" +echo ``` +echo for intel_backlight: +echo ``` +echo RUN+="/bin/chgrp video /sys/class/backlight/intel_backlight/brightness" +echo RUN+="/bin/chmod g+w /sys/class/backlight/intel_backlight/brightness" +echo ``` +