[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: capturing the bell
From: |
Micah Cowan |
Subject: |
Re: capturing the bell |
Date: |
Tue, 27 Jan 2009 22:29:50 -0800 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
JuanPablo wrote:
> hi,
> is posible capture the bell of screen in other program?
> example:
> if screen launch a bell, the dialog program is called
> dialog --msgbox "hello world" 6 25
>
> thanks
> JuanPablos
Try C-a : exec :.. /path/to/filter.pl <RET>
filter.pl:
- -------------------------------------
#!/usr/bin/perl
use warnings;
use strict;
use bytes;
my $foo=`stty -g`;
system("stty -icanon");
while (defined(my $c = getc)) {
if ($c eq "\a") {
system('dialog --msgbox "hello world" 6 25');
}
}
system("stty $foo");
- -------------------------------------
- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkl/+14ACgkQ7M8hyUobTrEMSQCfenb7JGQrhbWGUCMhH1v2z/Qa
KpkAnj3+RgAUQe9MyvJNYJfLBatDkiv7
=fROl
-----END PGP SIGNATURE-----