Subject : Re: LUG: Visible bell
From : Daniel Marcus <danielm.nc@gmail.[redacted]>
Date : Wed, 02 Jun 2010 15:13:49 -0400
Well, if you're trying to do notifications for the end of a build, how about:
curl --basic --user username:password --data status="Build complete!" http://twitter.com/statuses/update.xml
This way you could keep monitoring gwibber or whatever. Or have it go to your cell phone.
Also, I might say "make ... ; ./annoytron.sh" rather than "&&".With the latter, annoytron.sh will only execute if make had a return code of 0, or a successful build. If you use ";" instead, then whenever make finishes, it will alert you - irrespective of whether or not it failed, which you would want to know anyway.
Jay
On Wed, Jun 2, 2010 at 2:42 PM, Alexander Ray < alexjray.ncsu@gmail.[redacted] > wrote:
That sounds like a good idea. takes a bit more shell-scripting than just echo-ing control characters to the terminal.
This is just something to tack onto the end of build commands
$ make -f makefile.what REALLY_LONG_LIST_OF_BLAH_BLAH && ./annoytron.sh
these builds take 5 min, so i want to notice when its done, but not watch the terminal.
thanks moar,~Alex
On Wed, Jun 2, 2010 at 2:06 PM, Daniel Marcus < danielm.nc @ gmail.com > wrote:
Have you tried outputting to dbus or something, and let your DE notify you?
Positively,
Daniel S. Marcus
Omni Impact Small Business Services
Phone: (XXX) 926 9624
Business: daniel@omniimpact.[redacted]
Personal: daniel@d-site.[redacted]
Website: http://omniimpact.com
On Wed, Jun 2, 2010 at 12:38 PM, Alexander Ray < alexjray.ncsu@gmail.[redacted] > wrote:
I found a sort-of solution. dunno if this works.
I like Jay's idea, and that makes sense. (most of these ideas can be used together).
For what I need (running a shell script locally, no screen or ssh, in gnome-terminal) this works:
$ echo "\E[?5h"$ echo "\E[?5l"
great big annoying flashing (for me).
~Alex
On Wed, Jun 2, 2010 at 11:05 AM, Jay Goel < jpgoel@ncsu.[redacted] > wrote:
This won't (doesn't, in fact) work as expected. inversescreen only works in a virtual terminal, which it also says in the manpage. You could try doing this with ncurses; that is, wrap your bash script into a python or c program which uses the ncurses api to flash the terminal.
You could also have your program pop up a window of some sort - maybe using "zenity". This might do the trick. It flashes an icon in the notification area. When you click on that icon, then it stops flashing.
#! /bin/bash
RC=5
TIMEOUT=3
while [ $RC -gt 0 ]
do
zenity --notification --text "Hello world" --timeout=$TIMEOUT
RC=$?
sleep $TIMEOUT
done
Good luck!
Jay
On Wed, Jun 2, 2010 at 10:35 AM, Stephen Bryant < stephen@stephenbryant.[redacted] > wrote:
If you run it in screen, you can switch between visual bell and audio bell with C-a C-g. This will only flash it once though. If you want it to keep flashing, you might could write a script something like:
while (1)
{
setterm -inversescreen on
sleep(500)
setterm -inversescreen off
sleep(1000)
}
And then run your script as ./myscript.sh && ./flashterm.sh. I haven't tried this, but I'd think it should work in theory.
--
Stephen Bryant
On Wed, Jun 2, 2010 at 10:25 AM, Alexander Ray < alexjray.ncsu@gmail.[redacted] > wrote:
hey guys!
Yet another im-heavily-customizing-hacking-my-environment style question:
I'm working on automation scripts to make my life easier (read: hacker, lulz) and one of the things I'd like to do is have a script running in a terminal in the corner of my screen get my attention when its done.
This means:Flashing the terminal (a 'visual bell')Flashing the bar on my panel (for example, when you have the firefox download mini-window open, but minimized, and a download finished, this starts flashing)
What i'm avoiding:Audio bell. its just annoying. i <3 my music :-)
Thoughts?Ponders?Quandries?Good Jokes?Bad Jokes?
thanks,~Alex