#!/bin/bash info=$(eval "$*" 2>/dev/null) notify-send -t $((1000+300*`echo -n $info | wc -w`)) -u low -i gtk-dialog-info "$*" "$info" || exit 2
Last edited by karthik (2009-05-21 10:13:34)
Now this I've got to try as soon as I have time!
And for an improvement, how 'bout rethinking it so it can be added into the obmenu? You'll have to put it there initially, ofc, but then it'll only ever be a menu away
"History is the fiction we invent to persuade ourselves that events are knowable and that life has order and direction."
I'll give this a try in a few minutes with the new notifications...I'm pretty sure they don't let you specify a timeout though, and I don't know how they handle overflow since I don't think they resize....let you know in a little....Oh btw awesome work
edit: do you mind posting your scripts to the pastebin also? they sound usefull
Last edited by iggykoopa (2009-05-20 19:00:20)
Very nerdy l33t and ub3r c00l. I may have some uses for this type O' thang.
I view KDE like I view snow. It looks fun and marvelous, it's fun to play in, but after a while I just want someone to take it all away.
after a little bit of testing it still seems to be working pretty well with the new notifications...I'm pretty sure it doesn't honor the time you give it though.
gcalc and define are both working good here, the text from define tends to get cut off after about a paragraph though...but it may be my small screen. Also both of the scripts had a bad character after the #!/usr/bin/python line
bash: /home/eric/bin/gcalc: /usr/bin/python^M: bad interpreter: No such file or directory
but it was easy to fix. For hosting the files you could try dropbox or something like that, I've used it in the past for sharing files. If anyone has ideas for other plugins/scripts I'd be happy to work on them as I need the practice too.
edit: forgot to say how I fixed it for anoyone else...just go to the end of python and delete both newlines until the comments, then just hit enter twice to put them back and save it...must be something the pastebin did to it.
Last edited by iggykoopa (2009-05-20 19:44:39)
from what I have read there currently isn't anyway to change the timeout on the new updates. They did it that way purposely, not sure why though.
I just wanted to point this out because it makes me feel witty
Run this in a terminal or Alt+F2
send send send send send send send ls
send "ls * | grep '\.sh$' "
Last edited by michael.h4lios (2009-06-17 15:54:42)
This is great - I'd been looking for something useful to do with notify-send, and this is exactly it.
Thanks for sharing!
ls * | send grep '\.sh$'
I realise this is quite an old thread but I've only just come across notify-send and it looks very useful!
However, I'm having problems running it from a cron job - the send command is not being interpreted.
For example, if I want notification every 10 minutes:
*/10 * * * * /home/scripts/send message
will not work.
I've tried several options and searched extensively but I cannot find a solution.
Any ideas would be most appreciated.
Last edited by Kino (2012-03-29 06:34:44)
I'm not sure, Kino, but I think that's */10 in the first field there. Other than that I don't know if I could help.
Punch all your friends.
Yeah, that was a typo.
mlevin@H016342:~$ define rambunctious RAMBUNCTIOUS: No definitions found for RAMBUNCTIOUS mlevin@H016342:~$ gcalc "24500 INR in USD" Google Calculator did not understand : 24500 INR in USD mlevin@H016342:~$