ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/tabbed
(Generate patch)

Comparing rxvt-unicode/src/perl/tabbed (file contents):
Revision 1.31 by root, Wed Jun 6 15:06:41 2012 UTC vs.
Revision 1.37 by root, Sat May 17 13:38:23 2014 UTC

1#! perl 1#! perl
2 2
3#:META:X_RESOURCE:tabbar-fg:tab bar foreground colour 3#:META:RESOURCE:tabbar-fg:colour:tab bar foreground colour
4#:META:X_RESOURCE:tabbar-bg:tab bar background colour 4#:META:RESOURCE:tabbar-bg:colour:tab bar background colour
5#:META:X_RESOURCE:tab-fg:tab foreground colour 5#:META:RESOURCE:tab-fg:colour:tab foreground colour
6#:META:X_RESOURCE:tab-bg:tab background colour 6#:META:RESOURCE:tab-bg:colour:tab background colour
7
8=head1 NAME
9
10tabbed - tabbed interface to urxvt
11
12=head1 DESCRIPTION
13
14This transforms the terminal into a tabbar with additional terminals, that
15is, it implements what is commonly referred to as "tabbed terminal". The topmost line
16displays a "[NEW]" button, which, when clicked, will add a new tab, followed by one
17button per tab.
18
19Clicking a button will activate that tab. Pressing B<Shift-Left> and
20B<Shift-Right> will switch to the tab left or right of the current one,
21while B<Shift-Down> creates a new tab. Pressing B<Ctrl-Left> and
22B<Ctrl-Right> will renumber the current tab by moving it to the left or
23to the right.
24
25The tabbar itself can be configured similarly to a normal terminal, but
26with a resource class of C<URxvt.tabbed>. In addition, it supports the
27following four resources (shown with defaults):
28
29 URxvt.tabbed.tabbar-fg: <colour-index, default 3>
30 URxvt.tabbed.tabbar-bg: <colour-index, default 0>
31 URxvt.tabbed.tab-fg: <colour-index, default 0>
32 URxvt.tabbed.tab-bg: <colour-index, default 1>
33
34See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid
35indices.
36
37=cut
7 38
8sub refresh { 39sub refresh {
9 my ($self) = @_; 40 my ($self) = @_;
10 41
11 my $ncol = $self->ncol; 42 my $ncol = $self->ncol;
369 400
370# helper extension implementing the subwindows of a tabbed terminal. 401# helper extension implementing the subwindows of a tabbed terminal.
371# simply proxies all interesting calls back to the tabbed class. 402# simply proxies all interesting calls back to the tabbed class.
372 403
373{ 404{
374 for my $hook qw(start destroy key_press property_notify) { 405 for my $hook (qw(start destroy key_press property_notify)) {
375 eval qq{ 406 eval qq{
376 sub on_$hook { 407 sub on_$hook {
377 my \$parent = \$_[0]{term}{parent} 408 my \$parent = \$_[0]{term}{parent}
378 or return; 409 or return;
379 \$parent->tab_$hook (\@_) 410 \$parent->tab_$hook (\@_)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines