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.33 by root, Sun Jun 10 17:31:53 2012 UTC vs.
Revision 1.39 by sf-exg, Sun Feb 26 06:36:46 2017 UTC

1#! perl 1#! perl
2 2
3#:META:X_RESOURCE:tabbar-fg:colour:tab bar foreground colour 3#:META:RESOURCE:tabbar-fg:colour:tab bar foreground colour
4#:META:X_RESOURCE:tabbar-bg:colour:tab bar background colour 4#:META:RESOURCE:tabbar-bg:colour:tab bar background colour
5#:META:X_RESOURCE:tab-fg:colour:tab foreground colour 5#:META:RESOURCE:tab-fg:colour:tab foreground colour
6#:META:X_RESOURCE:tab-bg:colour:tab background colour 6#:META:RESOURCE:tab-bg:colour:tab background colour
7 7
8=head1 NAME 8=head1 NAME
9 9
10 tabbed - tabbed interface to urxvt 10tabbed - tabbed interface to urxvt
11 11
12=head1 DESCRIPTION 12=head1 DESCRIPTION
13 13
14This transforms the terminal into a tabbar with additional terminals, that 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 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 16displays a "[NEW]" button, which, when clicked, will add a new tab, followed by one
17button per tab. 17button per tab.
18 18
19Clicking a button will activate that tab. Pressing B<Shift-Left> and 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, 20B<Shift-Right> will switch to the tab left or right of the current one,
21while B<Shift-Down> creates a new tab. 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.
22 24
23The tabbar itself can be configured similarly to a normal terminal, but 25The tabbar itself can be configured similarly to a normal terminal, but
24with a resource class of C<URxvt.tabbed>. In addition, it supports the 26with a resource class of C<URxvt.tabbed>. In addition, it supports the
25following four resources (shown with defaults): 27following four resources (shown with defaults):
26 28
27 URxvt.tabbed.tabbar-fg: <colour-index, default 3> 29 URxvt.tabbed.tabbar-fg: <colour-index, default 3>
28 URxvt.tabbed.tabbar-bg: <colour-index, default 0> 30 URxvt.tabbed.tabbar-bg: <colour-index, default 0>
29 URxvt.tabbed.tab-fg: <colour-index, default 0> 31 URxvt.tabbed.tab-fg: <colour-index, default 0>
30 URxvt.tabbed.tab-bg: <colour-index, default 1> 32 URxvt.tabbed.tab-bg: <colour-index, default 1>
31 33
32See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid 34See I<COLOR AND GRAPHICS> in the urxvt(1) manpage for valid
33indices. 35indices.
34 36
35=cut 37=cut
36 38
37sub refresh { 39sub refresh {
212 214
213sub on_key_press { 215sub on_key_press {
214 my ($self, $event) = @_; 216 my ($self, $event) = @_;
215 217
216 $self->{cur}->key_press ($event->{state}, $event->{keycode}, $event->{time}); 218 $self->{cur}->key_press ($event->{state}, $event->{keycode}, $event->{time});
219 $self->{cur}->refresh_check;
217 220
218 1 221 1
219} 222}
220 223
221sub on_key_release { 224sub on_key_release {
222 my ($self, $event) = @_; 225 my ($self, $event) = @_;
223 226
224 $self->{cur}->key_release ($event->{state}, $event->{keycode}, $event->{time}); 227 $self->{cur}->key_release ($event->{state}, $event->{keycode}, $event->{time});
228 $self->{cur}->refresh_check;
225 229
226 1 230 1
227} 231}
228 232
229sub on_button_press { 233sub on_button_press {
398 402
399# helper extension implementing the subwindows of a tabbed terminal. 403# helper extension implementing the subwindows of a tabbed terminal.
400# simply proxies all interesting calls back to the tabbed class. 404# simply proxies all interesting calls back to the tabbed class.
401 405
402{ 406{
403 for my $hook qw(start destroy key_press property_notify) { 407 for my $hook (qw(start destroy key_press property_notify)) {
404 eval qq{ 408 eval qq{
405 sub on_$hook { 409 sub on_$hook {
406 my \$parent = \$_[0]{term}{parent} 410 my \$parent = \$_[0]{term}{parent}
407 or return; 411 or return;
408 \$parent->tab_$hook (\@_) 412 \$parent->tab_$hook (\@_)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines