LED Notification option


badcloud

Member
Joined
May 6, 2011
Messages
86
I brought this up on #openpandora@irc.freenode.net

I think it would be nice to have the option to configure LED notification for new emails/IM/dcc/whathaveyou in programs like pidgin, claws-mail etc.

Thoughts?
 
No hacking needed, it's a simple echo-command to change the LEDs.

Someone would need to code a notification daemon that sends details to the LEDs though.
 
There's already a Pidgin plugin for doing that with the keyboard lighting LED of Thinkpads, should be trivial to modify it for the Pandora.
 
Clawsmail has it too: "Support for a command to be issued on new mail arrival"

http://www.claws-mail.org/plugin.php?plugin=notification

(also to an lcd, see pics in link)

Attaching op_leds. It is a binary that can change led lights in userspace...

would take a few moments to slap this together...

Open Clawsmail, goto "Configuration", "Plugins", there load "notification" (not the acpinotifier).

Then goto "Configuration", "Preferences", on the bottom left, there is the Plugins section. Select command, and you can make a script run.

The script only gets incomming email notifications. There should be a disable method, I have not found yet (other than doing a timeout inside the script to disable the led light, it would be on until reboot). Also ledlights stay on when in sleepmode.

edit: Found one, if you add a notification popup, you can track for the existance of such popup and disable the light when the popup is not there anymore.

Anyway. The script (which needs to be coded) calls op_leds, which needs the following changes before it works:

// sudo chown root:users op_leds
// sudo chmod 4750 op_leds

I have no idea how to wait for a windows activate notification (such as de-traying clawsmail). (not happy to poll xwininfo without even having wmctrl)

http://derickrethans.nl/xfce-and-keyboard.html

What are your thoughts so far?

op_leds.zip
 

Attachments

  • op_leds.zip
    3.4 KB · Views: 284
Last edited by a moderator:
Why would you need to monitor window state? The notification should be dismissed when you open claws-mail up I'd have thought, or at least once you've read the unread mail.
 
The problem is that there is a signal for new incomming mail, but Clawsmail does not seem to have a signal for read email, or user clicked on window.

If you look at the options, it is a fire-and-forget action. "Mail has arrived, run this program. done."

So your script either also runs a widget that creates a button "new mail has arrived, click ok to turn off led light" (that is easy), or hooks itself up to something to know when to disable the light (this is complex).

Normal uses is for example, playing a short audio fragment, that is true fire-and-forget. Or blink light 5 times, and done. (with the risk of not hearing/seeing it)
 
Last edited by a moderator:
Back
Top