I am in a new environment, where everyone uses Skype to talk, chat and send work related notifications. And as a very lazy programmer, I prefer coding and a simple assistant to tell me what is happening, then I decide whether I care to read or not. Simple skype pop up notifications, does not suffice. Fortunatly, skype on linux provide a very amazing notifications facility. You can execute a program / command, on a specific notification type or all notifications.
Thinking little bit, I thought ; “Why not to send the messages received to festival, to read them for me ! “. And I DID !!!
So, getting festival on my ubuntu box …
sudo apt-get install festival -y
Then, simply add this to your skype notifications ( NOTE: click Advanced View to show input field of Execute the following script )
echo "%sname" "%smessage" | festival --tts
Getting more sophisticated
To get stuff more customizable, we can create a simple shell script like this in our home directory “~”, lets call it read.sh
#!/bin/bash # # Reads the passed parameters # name="`echo $@ | cut -d: -f1`"; message="`echo $@ | cut -d: -f2`" firstname="`echo $name | cut -d\ -f1`"; echo "$firstname said $message" | festival --tts
The script above removes the second word, which happens to be the last name of all my colleagues !. Now we can modify the notifications configurations of skype on linux to look like this :
Notice the change in the command in Execute the following script :
~/read.sh "%sname : %smessage"
Other variables for skype notifications are:
- Notification type : “%type”
- Username : %sskype
- Contact name : “%sname”
- Message Contents: “%smessage”
- File name : “%fname”
- File path : “%fpath”
- File size: %fsize
That is all I know about skype notifications on linux ( On Mac OS X, all I got was a “@” which refers to the contact name )
Please, if you have more information about skype notifications on Linux or Mac, please, drop in a comment.