Author Topic: [workaround] Notifications with sound  (Read 313 times)

Offline Socratea

  • Full Member
  • ***
  • Posts: 156
  • Noob is as noob does
[workaround] Notifications with sound
« on: January 13, 2011, 06:31:36 AM »
I've been adding system notifications in R (programming language for mathematics and statistics) to notify me when my calculations finish.

For those interested in R. The code look something like this. Replace the icon with one of your own.

Code: ( "R") [Select]
if(Sys.info()["sysname"]=="Linux"){
system('notify-send -i /mnt/disk/Work/Library/Notifications/Rlogo.png -u normal "Script completed" "Whats next?"')
}

I would like to add a sound notification to this. But haven't been able to figure out how. Can anybody help?
So if I use this piece of code, what should I add to get a (system standard) sound notification?
 
Code: ( "shell") [Select]
notify-send -u normal "Script completed"

Many thanks for you time,
« Last Edit: January 16, 2011, 05:04:52 AM by Writhen »

Only those that choose a different path from
the others become great and infinite.

.

Offline Socratea

  • Full Member
  • ***
  • Posts: 156
  • Noob is as noob does
Re: Notifications with sound
« Reply #1 on: January 16, 2011, 05:04:17 AM »
Oke this is a decent workaround. Just use:

Code: ( "shell") [Select]
play -t mp3 /mnt/disk/Work/Library/Notifications/doom1.wav
With your own soundfile ofcourse..
« Last Edit: January 16, 2011, 10:34:43 AM by Writhen »

Only those that choose a different path from
the others become great and infinite.

.