pmaports/main/postmarketos-base/rootfs-lib-udev-rules.d-20-tm2-touchkey-leds.rules
Jakob Hauser 4baa805b41
main/postmarketos-base: change permission on tm2-touchkey leds (MR 2380)
Allow users in group "input" to control the tm2-touchkey leds.

Additionally correcting the udev rule for disabling the tm2-touchkey leds by default.

[ci:skip-build] already built successfully in CI
2021-08-10 00:03:50 -07:00

7 lines
577 B
Text

# disable tm2-touchkey leds by default
# To change the default, copy the file to /etc/udev/rules.d, increase the file name number and change brightness to 1.
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", ATTR{brightness}="0"
# allow users in group "input" to control the tm2-touchkey leds
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", RUN+="/bin/chgrp -R input /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
ACTION=="change", SUBSYSTEM=="leds", KERNEL=="tm2-touchkey", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R input /sys%p", RUN+="/bin/chmod -R g=u /sys%p"