Hi list,
I created a small patch that makes it possible to move current tab one
place left or right. The actions are bound to C-left and C-right keys.
The patch is against 9.0, but after the inspection of CVS version of
tabbed I believe it should seamlessly apply also there.
Thanks,
PM
diff -urp rxvt-unicode-9.0/src/perl/tabbed rxvt-unicode-9.0-pm/src/perl/tabbed
--- rxvt-unicode-9.0/src/perl/tabbed 2006-02-20 21:44:22.000000000 +0100
+++ rxvt-unicode-9.0-pm/src/perl/tabbed 2008-02-04 14:59:53.000000000 +0100
@@ -325,6 +325,22 @@ sub tab_key_press {
return 1;
}
}
+ elsif ($event->{state} & urxvt::ControlMask) {
+ if ($keysym == 0xff51 || $keysym == 0xff53) {
+ my ($idx1) = grep $self->{tabs}[$_] == $tab, 0 .. $#{ $self->{tabs} };
+
+ my ($idx2) = $idx1 + 1;
+ $idx2 -= 2 if $keysym == 0xff51;
+ $idx2 = $idx2 % @{ $self->{tabs}};
+
+ my ($tab1) = $self->{tabs}[$idx2];
+ $self->{tabs}[$idx2] = $self->{tabs}[$idx1];
+ $self->{tabs}[$idx1] = $tab1;
+ $self->make_current ($self->{tabs}[$idx2]);
+
+ return 1;
+ }
+ }
()
}
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode