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.29 by mikachu, Mon Jan 9 17:49:00 2012 UTC vs.
Revision 1.33 by root, Sun Jun 10 17:31:53 2012 UTC

1#! perl 1#! perl
2
3#:META:X_RESOURCE:tabbar-fg:colour:tab bar foreground colour
4#:META:X_RESOURCE:tabbar-bg:colour:tab bar background colour
5#:META:X_RESOURCE:tab-fg:colour:tab foreground colour
6#:META:X_RESOURCE:tab-bg:colour:tab background colour
7
8=head1 NAME
9
10 tabbed - 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.
22
23The tabbar itself can be configured similarly to a normal terminal, but
24with a resource class of C<URxvt.tabbed>. In addition, it supports the
25following four resources (shown with defaults):
26
27 URxvt.tabbed.tabbar-fg: <colour-index, default 3>
28 URxvt.tabbed.tabbar-bg: <colour-index, default 0>
29 URxvt.tabbed.tab-fg: <colour-index, default 0>
30 URxvt.tabbed.tab-bg: <colour-index, default 1>
31
32See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid
33indices.
34
35=cut
2 36
3sub refresh { 37sub refresh {
4 my ($self) = @_; 38 my ($self) = @_;
5 39
6 my $ncol = $self->ncol; 40 my $ncol = $self->ncol;
77 111
78 # this is an extremely dirty way to force a configurenotify, but who cares 112 # this is an extremely dirty way to force a configurenotify, but who cares
79 $tab->XMoveResizeWindow ( 113 $tab->XMoveResizeWindow (
80 $tab->parent, 114 $tab->parent,
81 0, $self->{tabheight} + 1, 115 0, $self->{tabheight} + 1,
82 $self->width, 116 $self->width, $self->height - $self->{tabheight}
83 $self->height - $self->{tabheight} + 2 * $tab->int_bwidth
84 ); 117 );
85 $tab->XMoveResizeWindow ( 118 $tab->XMoveResizeWindow (
86 $tab->parent, 119 $tab->parent,
87 0, $self->{tabheight}, 120 0, $self->{tabheight},
88 $self->width, 121 $self->width, $self->height - $self->{tabheight}
89 $self->height - $self->{tabheight} + 2 * $tab->int_bwidth
90 ); 122 );
91} 123}
92 124
93sub on_resize_all_windows { 125sub on_resize_all_windows {
94 my ($self, $width, $height) = @_; 126 my ($self, $width, $height) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines