diff --git a/etc/acpi/handler.sh b/etc/acpi/handler.sh index 912b968..ddbc5f6 100755 --- a/etc/acpi/handler.sh +++ b/etc/acpi/handler.sh @@ -8,6 +8,12 @@ for_each_pa_user() { } case "$1" in + button/brightnessup) + for_each_pa_user sudo xbacklight -inc 10 + ;; + button/brightnessdown) + for_each_pa_user sudo xbacklight -dec 10 + ;; button/volumedown) for_each_pa_user /etc/acpi/volume.sh -10% ;; diff --git a/etc/udev/rules.d/backlight.rules b/etc/udev/rules.d/backlight.rules new file mode 100644 index 0000000..5440ae6 --- /dev/null +++ b/etc/udev/rules.d/backlight.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness" diff --git a/install_dotfiles.sh b/install_dotfiles.sh index 0deda15..a947bd7 100755 --- a/install_dotfiles.sh +++ b/install_dotfiles.sh @@ -149,6 +149,7 @@ if [ "${WORKSTATION}" -eq 1 ]; then install .config/darktable/darktablerc install -r usr/share/darktable/noiseprofiles.json install -r usr/share/lensfun/version_1/compact-sony.xml + install -r etc/udev/rules.d/backlight.rules fi if [ "${DEV}" -eq 1 ] && [ "${WORKSTATION}" -eq 1 ]; then