Ah... Such a relief that I was actually making this _more_ complicated than necessary rather than the other way around...
Thanks Michael Traxler! It's like breathing fresh air. I'll be playing with this immediately. It's so simple... I can't believe it. And for everyone else, make sure that you see what I see. You can try one of the examples immediately to test on your system (works for me so far, we'll see how it goes): Have a look at the examples at the bottom of the page on https://github.com/michaeltraxler/urxvt-perls (Thanks again, Michael Traxler! I owe you a beer.) Specifically: --- Calls to be able to open tabs via scripts have been added. This is an example script to start some tabs with commands in them, which can be started either with $ ./startup_script.sh or via $ urxvt -e './startup_script.sh' startup_script.sh: printf "\033]777;tabbedex;new_tab\007" sleep 0.1 printf "\033]777;tabbedex;make_current;1\007" printf "\033]777;tabbedex;set_tab_name;MAIL\007" printf "\033]777;tabbedex;new_tab;tmux\007" sleep 0.1 printf "\033]777;tabbedex;make_current;2\007" printf "\033]777;tabbedex;set_tab_name;TMUX\007" printf "\033]777;tabbedex;new_tab\007" sleep 0.1 printf "\033]777;tabbedex;make_current;3\007" printf "\033]777;tabbedex;set_tab_name;interactive\007" printf "\033]777;tabbedex;interactive_command;ls /; ls -R\007" printf "\033]777;tabbedex;new_tab\007" sleep 0.1 printf "\033]777;tabbedex;make_current;4\007" printf "\033]777;tabbedex;set_tab_name;interactive\007" printf "\033]777;tabbedex;interactive_command;ls /; ls -R /\007" sleep 0.1; > -----Original Message----- > From: [email protected] > Sent: Sat, 3 Jan 2015 00:43:54 +0100 (CET) > To: [email protected] > Subject: Re: urxvt, tabbedex, tmux: Opening a new tab and sending a > command > > Hello, > > maybe there is a misunderstanding here.... > > The way these new functions in tabbedex are supposed to be used is the > following: > - you just add the tabbedex source to ~/.urxvt/ext/tabbedex > - add as usual "tabbedex" to the .Xdefaults via: > urxvt*perl-ext-common: ....,tabbedex > > Then you can just normally start urxvt. > If you want some automatism there is a mechanism built-in in urxvt which > has > as the API escape-sequences, as all other commands (font changes etc.). > For these OSC = operating system commands the character sequence is > "ESC ] 777 ; string ST" as explained in the manual urxvtperl(3). > > So, to open a new tab in urxvt you can now write in any shell-script: > printf "\033]777;tabbedex;new_tab\007" > > As shown here (https://github.com/michaeltraxler/urxvt-perls at the > bottom) I > invented some more calls which makes the "remote control" and scripting > of a > tab in urxvt possible. > > The tabbedex-code you only have to touch if the functions available > (new_tab, make_current, set_tab_name, interactive_command) are not > sufficient > for you. > Try the example script and the commands with arguments should (I hope) be > self > explaining. > > Michael > > > On Freitag 2015-01-02 05:39, kario tay wrote: > > >Date: Fri, 2 Jan 2015 05:39:03 > >From: kario tay <[email protected]> > >To: Michael Traxler <[email protected]> > >Cc: [email protected] > >Subject: Re: urxvt, tabbedex, tmux: Opening a new tab and sending a > command >> >> Created Perl extension "osc_test" to experiment >> with the new version "tabbedex": >> >> ---- >> >> #! perl >> >> sub on_child_start >> { >> my ($self, @argv) = @_; >> my $tabbedex = $self->{tabbedex}; >> >> my $tab_command = "new_tab"; >> my $osc = "emacs"; >> $tabbedex->tab_osc_seq_perl($self, $tab_command, $osc); >> } >> >> ---- >> >> Command: >> >> urxvt -pe osc_test >> >> ---- >> >> Outcomes: >> >> 1. A new urxvt window opens. >> >> 2. On the commandline of the originating window >> (the window into which the command was entered), >> an error message: >> >> urxvt: Can't call method "tab_osc_seq_perl" on an undefined value at >> /path/to/urvxt/extensions/osc_test line 11. >> >> ----- >> >> P.S. An idle thought -- what if urxvt was written in LISP... now that >> would be >> truly wizardlike (cue the inevitable interjections about Python and >> Haskell, of course). >> >> >>> -----Original Message----- >>> From: [email protected] >>> Sent: Sat, 27 Dec 2014 04:41:46 +0100 (CET) >>> To: [email protected] >>> Subject: Re: urxvt, tabbedex, tmux: Opening a new tab and sending a >>> command >>> >>> Hi, >>> >>> I can contribute to that: >>> >>> You can find my extended tabbedex extention here: >>> https://github.com/michaeltraxler/urxvt-perls/blob/master/tabbedex >>> >>> where the help with an example script can be found here: >>> https://github.com/michaeltraxler/urxvt-perls >> >> ____________________________________________________________ >> Can't remember your password? Do you need a strong and secure password? >> Use Password manager! It stores your passwords & protects your account. >> Check it out at http://mysecurelogon.com/manager >> >> >> ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! _______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
