Perhaps something that ran in the background and activated the LED notification light as follows:
RED led flashes when there is an email or sms that has not been viewed (ie fresh/unread)
GREEN led flashes at a certain time interval (eg every 3 seconds) when the phone is connected to a network
Its one of the main features a friend wants to replicate in his new phone. He is coming from a BlackBerry that currently does this (yes, still - and been waiting to join the Librem 5 club).
I guess the question that I would ask is: Is the expectation that all this would happen only when the phone is in active use or also when it is idle?
The reason I ask is that at some times when the phone is idle it wants to go to sleep - and there is a trade-off in keeping it awake in order to do things but thereby reducing time between charges.
I think it would be badness to use the red LED in this way because the red LED is used to indicate what’s happening with charging. So are the colours negotiable?
The blue LED is used for notifications - but that includes quite a few different notifications, not just e.g. a new SMS.
The green LED is used during the boot but once booted I don’t think it is used for anything else.
I’m a bit unconvinced about the merits of knowing when the phone is connected to a network. I mean unless you are in a flaky signal area, the phone is (more or less) always connected to the mobile network, unless you’ve switched the modem off. Are we talking only about the mobile network or also talking about WiFi?
As to the actual question, maybe here: A way to disable blinking red led? It’s not something that I have tried however. Do you have a Librem 5 yourself to test with? (Note also that even though I have linked you to a topic about disabling the blinking red LED, you can’t do that and the actual post shows someone enabling the green LED.)
I think you do not need to program anything. @irvinewade already pointed out that the red led is used for charging and that cannot be changed easily, because it is hard wired (you can see that in the upper red left corner at BQ25895 in the schematics diagram for the librem5).
If you’d agree on colours for the things you’d want to signal you could use feedbackd to let the led signal the way you want. The feedbackd page contains information on howto change and extend possible feedbacks (feedback as in vibration, led, sound).
In its configuration you can adjust whatever you want to happen on sms or email. Your applications (chatty for sms - sadly it does send message-new-instantinstead ofmessage-new-sms at the time being, but there’s said to be work on the schedule to improve notifications for chatty) and whatever email client you’re using.
To clarify that … it’s an “or”. So if the charger wants the red LED on then it will be on, and you can’t turn it off in software. If the charger doesn’t want the red LED on (i.e. charging is not in progress and not paused) then you are free to control it in software. But I think it would be a poor user experience since charging will be happening a fair amount of the time and hence the red LED won’t be 100% under your control.