How to make a custom led pattern?
I searched far and wide but I didn't find instructions to do the following:
I'd like to have the led blinking when the screen is off but the device isn't locked. This would allow me to see if I need to lock it manually before leaving it on a table. I think notification-style blinking and screen-dimming colour would do allright for me (I read that unlinke breathing, blinking doesn't require CPU and thus is more energy effient).
Edit: Here's what I did: I opened the file like this:
nano /etc/mce/20hybris-led.ini
Then I edited PatternDeviceOn=
to
200;0;600;100;3000;00ffff
(importancy=200, 0 means it runs when display is off, 600=10 minutes, the time it takes for my phone to autolock, 100 is the time in milliseconds when the led is on, 3000(ms) is the frequency and 00ffff is the color (cyan).)
After that I removed PatternDeviceOn
from LEDPatternsDisabled=
(at the end of the file) and rebooted.
There are two problems, though:
1. The blinking stops after 10 minutes and doesn't reset
2. It blinks even if you lock via doublepress on powerkey
I think I need to assign some dbus actions to the powerkey: doubleclick will stop the blinking and normal click will restart the blinking. But the blinking should also be restarted when I unblank the screen via doubletap. How can I do that?
From what I understand, you need a pattern for display_off (without timeout of 10min) and another pattern for device_locked which stops LED. What I do not know yet is, how to fire the second pattern.
lakutalo ( 2015-11-12 20:14:41 +0200 )editOr simply firing this pattern only when the screen goes off via anything else than a doubleclick on powerkey. Heureka! This should be doable with mcetool and a single dbus call.
jollailija ( 2015-11-12 20:52:11 +0200 )edit