Hi,

I could solve this by adding the following:

note the different name of the function (on_osc_seq_perl is never called!).

sub tab_osc_seq_perl {
    my ($self, $tab, $osc) = @_;
    return unless $osc =~ s/^tabbedex;//;
    $osc =~ s/^([^;]+)+;//
        or return;

    if ($1 eq "new_tab") {
        my ($new_name) = split /;/, $osc, 1;
        #$tab->{name} = $new_name;
        $self->new_tab;
        $self->refresh;
    }

   if ($1 eq "rename_tab") {
       my ($new_name, $tab_number) = split /;/, $osc, 2;
       $self->{tabs}[$tab_number]->{'name'} = $new_name;
       $self->make_current($self->{tabs}[$tab_number]);
   }

    if ($1 eq "make_current") {
        my ($tab_number) = split /;/, $osc, 1;
        $self->make_current($self->{tabs}[$tab_number]);
    }


    1;
}


"osc_seq_perl" also has to be added for the hooks in:
....
   for my $hook (qw(osc_seq_perl start destroy user_command key_press
   property_notify add_lines)) {
....

This works for adding tabs with names with:
printf "\033]777;tabbedex;new_tab;na\007"
printf "\033]777;tabbedex;new_tab;na\007"

printf "\033]777;tabbedex;rename_tab;MAIL;0\007"
printf "\033]777;tabbedex;rename_tab;root;1\007"

Very good!

But this doesn't solve the issue, that I can not chose from a script a tab
(with make_current) and then call programs in this particular tab (by that
in different shells).
Any idea for that?

Thanks,

Michael


---------------------------------------

On Mon, 6 Jan 2014, Marc Lehmann wrote:

Date: Mon, 6 Jan 2014 04:50:26 +0100
From: Marc Lehmann <[email protected]>
To: Michael Traxler <[email protected]>
Cc: [email protected]
Subject: Re: using perl extenstions from scripts

On Sun, Jan 05, 2014 at 01:07:49PM +0100, Michael Traxler <[email protected]> 
wrote:
echo -n "\033]777;tabbedex:new_tab\007"

That would be the correct sequence.

Unfortunately, this doesn't have any effect.

At least in the "official" sources (git://github.com/stepb/urxvt-tabbedex)
I don't see any support for that.

Can you help me how to do this right?

You would need to add an on_osc_seq_perl handler to tabbedex - it's described
a few lines later in the manual.

--
               The choice of a       Deliantra, the free code+content MORPG
     -----==-     _GNU_              http://www.deliantra.net
     ----==-- _       generation
     ---==---(_)__  __ ____  __      Marc Lehmann
     --==---/ / _ \/ // /\ \/ /      [email protected]
     -=====/_/_//_/\_,_/ /_/\_\


_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to