Subject : Re: LUG: Visible bell
From : Alexander Ray <alexjray.ncsu@gmail.[redacted]>
Date : Wed, 02 Jun 2010 12:38:21 -0400
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
Replies :