[Pkg-urxvt-maintainers] Bug#633989: Bug#633989: Bug#633989: rxvt-unicode: add -blc option to specify command to play instead of sounding bell
Ryan Kavanagh
ryanakca at kubuntu.org
Tue Jul 19 18:32:00 UTC 2011
Hi Again,
On Tue, Jul 19, 2011 at 01:27:14PM -0400, Ryan Kavanagh wrote:
> Please don't hesitate to let me know if you're interested in writing the
> perl extension.
I decided to try my hand at writing the extension, you can find a copy
attached. You'll need to set the bellCommand resource to use it, it's
currently not possible to add an option (ex: -blc) with perl extensions.
Please test and let me know how it goes.
Best wishes,
Ryan
--
|_)|_/ Ryan Kavanagh | GnuPG key
| \| \ http://ryanak.ca/ | 4A11C97A (Transitioning from E95EDDC9)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------- next part --------------
#! perl
# Optional Bell Command for http://bugs.debian.org/633989
# Copyright (C) 2011 Ryan Kavanagh <ryanakca at kubuntu.org>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
sub on_start {
my ($self) = @_;
$self->{command} = $self->x_resource("bellCommand") ||
"false";
()
}
sub on_bell {
my ($self) = @_;
my @exec = $self->exec_async($self->{command});
()
}
# vim:set sw=3 sts=3 et:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1876 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-urxvt-maintainers/attachments/20110719/9c1674db/attachment-0002.pgp>
More information about the Pkg-urxvt-maintainers
mailing list