View Single Post
Posts: 7 | Thanked: 38 times | Joined on Jun 2014
#53
What about that keyboard LEDs ?
I've managed something with keyboard leds.

Here is a simple script:

Code:
#!/bin/sh

# there are different modes: run disabled load. I use run for ON and disabled for OFF
mode="run"

# 0-255
brightness="50"

echo $mode > /sys/class/i2c-adapter/i2c-2/2-0032/engine3_mode

echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb1/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb2/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb3/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb4/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb5/brightness
echo $brightness > /sys/class/i2c-adapter/i2c-2/2-0032/leds/lp5523:kb6/brightness
Create two of those (with changed values), chmod it, put in path, add a line in visudo so you don't have to write password every time and enjoy typing in dark

Probably there is some more elegant way to achieve keyboard led on/off but...

Last edited by sakrabojski; 2014-06-06 at 06:37. Reason: bugfix
 

The Following 11 Users Say Thank You to sakrabojski For This Useful Post: