screen-users
[Top][All Lists]
Advanced

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

Re: capturing the bell


From: JuanPablo
Subject: Re: capturing the bell
Date: Wed, 28 Jan 2009 12:16:33 -0300

Micah,
  many thanks for you reply.
is posible capture of similarly the alerm messages of screen ?


On Wed, Jan 28, 2009 at 3:29 AM, Micah Cowan <address@hidden> wrote:
-----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-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]