[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ireminder



--- Ahmed El-Mahmoudy <aelmahmoudy at users dot sourceforge dot net> wrote:
> Attached with this email is the new version of ireminder.
> Now the -azan option accepts a play command instead of an audio file.
> The command can take two parameters, the first will be the prayer name, 
> the second will be the prayer time. Here's an example:
> 
> ireminder -azan "myazan_cmd -opt1 %s -opt2 %s"
> 
> So when ireminder runs that myazan_cmd, it will subsitute the first '%s' 
> with prayer name & second '%s' with prayer time.

Thank you Ahmed for your continued interest and help.  I just committed
a change that takes into account what you'd like to do though I opted
to utilize Thamer's idea - namely,

--- Thamer Mahmoud <thamer at newkuwait dot org> wrote:
> ... but I don't think hard-coding "mplayer", or any other command,
> is a good idea. I would much rather have a more generic solution
> for ireminder. Something like:
> 
> ireminder -exec "command %s" 
> 
> Where the '%s' is automatically replaced by the prayer name and
> time. This would allow the user to use any command suitable, while
> still be able to test for the prayer name and time (useful for passing
> it to a messagebox command, or for playing a different Athan sound for
> Fajr, for example).

The new options will allow both of the above in the form of,

 ireminder -execr "cmd1 %m" -execs "cmd2 %s"

which notes that the reminder will run 'cmd1' and will substitute
the normal (ie. current) message string for '%m'.  When the actual
salat time triggers then 'cmd2' will be invoked while substituting
'%s' for the current salat's name.

So one can (you'll have to check the exact options/arguments),

 ireminder -execr 'notify-send "title" "%m"' -execs 'mplayer %s.mp3'

or similar.  Note, per the -help and the manpage, the -execR stands
for Reminder while -execS stands for the Salat_now trigger.

Salam.

 - Nadim


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com