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 |
10 | tabbed - tabbed interface to urxvt |
11 | |
11 | |
12 | =head1 DESCRIPTION |
12 | =head1 DESCRIPTION |
13 | |
13 | |
14 | This transforms the terminal into a tabbar with additional terminals, that |
14 | This transforms the terminal into a tabbar with additional terminals, that |
15 | is, it implements what is commonly referred to as "tabbed terminal". The topmost line |
15 | is, it implements what is commonly referred to as "tabbed terminal". The topmost line |
… | |
… | |
29 | URxvt.tabbed.tabbar-fg: <colour-index, default 3> |
29 | URxvt.tabbed.tabbar-fg: <colour-index, default 3> |
30 | URxvt.tabbed.tabbar-bg: <colour-index, default 0> |
30 | URxvt.tabbed.tabbar-bg: <colour-index, default 0> |
31 | URxvt.tabbed.tab-fg: <colour-index, default 0> |
31 | URxvt.tabbed.tab-fg: <colour-index, default 0> |
32 | URxvt.tabbed.tab-bg: <colour-index, default 1> |
32 | URxvt.tabbed.tab-bg: <colour-index, default 1> |
33 | |
33 | |
34 | See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid |
34 | See I<COLOR AND GRAPHICS> in the urxvt(1) manpage for valid |
35 | indices. |
35 | indices. |
36 | |
36 | |
37 | =cut |
37 | =cut |
38 | |
38 | |
39 | sub refresh { |
39 | sub refresh { |
… | |
… | |
214 | |
214 | |
215 | sub on_key_press { |
215 | sub on_key_press { |
216 | my ($self, $event) = @_; |
216 | my ($self, $event) = @_; |
217 | |
217 | |
218 | $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; |
219 | |
220 | |
220 | 1 |
221 | 1 |
221 | } |
222 | } |
222 | |
223 | |
223 | sub on_key_release { |
224 | sub on_key_release { |
224 | my ($self, $event) = @_; |
225 | my ($self, $event) = @_; |
225 | |
226 | |
226 | $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; |
227 | |
229 | |
228 | 1 |
230 | 1 |
229 | } |
231 | } |
230 | |
232 | |
231 | sub on_button_press { |
233 | sub on_button_press { |
… | |
… | |
400 | |
402 | |
401 | # helper extension implementing the subwindows of a tabbed terminal. |
403 | # helper extension implementing the subwindows of a tabbed terminal. |
402 | # simply proxies all interesting calls back to the tabbed class. |
404 | # simply proxies all interesting calls back to the tabbed class. |
403 | |
405 | |
404 | { |
406 | { |
405 | for my $hook qw(start destroy key_press property_notify) { |
407 | for my $hook (qw(start destroy key_press property_notify)) { |
406 | eval qq{ |
408 | eval qq{ |
407 | sub on_$hook { |
409 | sub on_$hook { |
408 | my \$parent = \$_[0]{term}{parent} |
410 | my \$parent = \$_[0]{term}{parent} |
409 | or return; |
411 | or return; |
410 | \$parent->tab_$hook (\@_) |
412 | \$parent->tab_$hook (\@_) |