Last active
January 3, 2016 01:29
-
-
Save jottr/8389727 to your computer and use it in GitHub Desktop.
Blink thinklight
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SUBSYSTEM=="leds", RUN+="/bin/sh /sbin/thinklight_permissions" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for (( i=0; i<"$@"; i++ )) | |
| do | |
| echo 255 > /sys/class/leds/tpacpi\:\:thinklight/brightness; | |
| sleep .5 | |
| echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness; | |
| sleep .5 | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Change permissions on thinklight device | |
| /bin/chmod o+w /sys/devices/platform/thinkpad_acpi/leds/tpacpi\:\:thinklight/brightness |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment