On Fri, Nov 07, 2008 at 05:50:44PM +0100, Adeodato Simó wrote:
> I read in [1] about the possibility of adding a bell event. I must say,
> I would welcome this very much, since it's the only functionality I'm
> missing from my previous terminal emulator.
>
> (I need it in order to make the tabbed extension only mark as "with
> activite" tabs where a bell happened.)
I wrote a patch for the very same reason, see attached.
Emanuele
diff --git a/src/hookinc.h b/src/hookinc.h
index 346fc59..311056e 100644
--- a/src/hookinc.h
+++ b/src/hookinc.h
@@ -52,3 +52,5 @@
def (CUSTOM_REND) // hovering over custom rendition, generate enter/leave maybe?
+ def (BELL)
+
diff --git a/src/perl/tabbed b/src/perl/tabbed
index fc08a78..a9cb845 100644
--- a/src/perl/tabbed
+++ b/src/perl/tabbed
@@ -372,7 +372,7 @@ package urxvt::ext::tabbed::tab;
}
}
-sub on_add_lines {
+sub on_bell {
$_[0]->{activity}++
or $_[0]{term}{parent}->tab_activity ($_[0]);
()
diff --git a/src/screen.C b/src/screen.C
index 02b2e7c..af1dc62 100644
--- a/src/screen.C
+++ b/src/screen.C
@@ -1920,6 +1920,7 @@ rxvt_term::scr_bell () NOTHROW
}
else
XBell (dpy, 0);
+ HOOK_INVOKE ((this, HOOK_BELL, DT_END));
#endif
}
diff --git a/src/urxvt.pm b/src/urxvt.pm
index ab9f0b8..aab2a43 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -678,6 +678,10 @@ subwindow.
Called when various types of ClientMessage events are received (all with
format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW).
+=item on_bell $term
+
+Called on receipt of a bell character.
+
=back
=cut
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode