Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Feature Request for Mail applet
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Feature Request for Mail applet
Robert63 English 3 fabounet [Read]
30 March 2013 à 19:17

Robert63, Friday 29 March 2013 à 14:51


Subscription date : 26 April 2010
Messages : 7
Hello,

I've been using the dock and the mail applet for some time now, and I want to say that they are quite useful. Thanks for creating this great software.

I really like the Mail applet, and recently began experimenting with playing various sounds as a notification when new mail arrives in my Inbox. I was reading elsewhere about the speech-dispatcher program which is included or can be added to the various Linux distributions.

My question is: is it possible to add the ability to run a script when mail arrives, rather than just play a sound? This way, speech-dispatcher could be used to generate a spoken notification. Depending on information available from the mail applet, the script could say something similar to "Robert, you have six e-mails."

Thanks for your consideration,
Robert63

fabounet, Friday 29 March 2013 à 15:14


Subscription date : 30 November 2007
Messages : 17118
well, you can try to hack the code (it's quite easy, replace cairo_dock_play_sound(myConfig.cNewMailUserSound); by cairo_dock_launch_command ("/path/to/your/script.sh");), and see what you can come up with

launching a script might be a good idea, maybe it could be used in others applets too

Guest, Saturday 30 March 2013 à 19:05

fabounet :
well, you can try to hack the code (it's quite easy, replace cairo_dock_play_sound(myConfig.cNewMailUserSound); by cairo_dock_launch_command ("/path/to/your/script.sh");), and see what you can come up with

launching a script might be a good idea, maybe it could be used in others applets too


This worked quite well. I had to get the relevant programs to compile and build for my Linux Mint 14 MATE (64-bit) system, and used bzr to pull the 3.2.0 source code. The install instructions provided on this site are excellent. If you decide to add this to the main branch, perhaps give users an option to play a sound or run a script....could it be useful to do both at the same time?

I agree that this could be useful in other applets where a similar state change occurs.

I also noticed that just below the line where I made the change is the if block that tests and prints the notification messages for single/multiple mails. If I can pass this line to my script with the count variable expanded, then it would be precisely what I was looking for when I made the original post.

Thanks for your guidance,
Robert

fabounet, Saturday 30 March 2013 à 19:17


Subscription date : 30 November 2007
Messages : 17118
you can build the command with something like that:
gchar *cmd = g_strdup_printf ("/path/to/script.sh %d", number-of-mails);
cairo_dock_launch_command (cmd);
g_free (cmd);

Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Feature Request for Mail applet
Robert63 English 3 fabounet [Read]
30 March 2013 à 19:17


Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Feature Request for Mail applet Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.