Hi, I can contribute to that:
With the *precise* help of Marc (up to now he was never wrong with any statement, which is remarkable!) I was able to build something which is doing what I wanted and maybe also fits your needs. It is now easy to extend. 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 The only thing which is strange is that the "sleep 0.1" are needed, otherwise when you call the script twice the tabs are somehow garbled (one has to open a new tab with <shift-cursor down> to be usable again). I have the suspicion, that there is a timing issue when a new tab is opened. During a short time during this opening process, commands are lost and a strange state is reached. I *guess* that this is related to my other problem with tabbedex/urxvt, that from time fast opening of many windows (or closing them) will lead to a "lockdown" of urxvt (no keypress is accepted anymore). I hope this helps. And thanks again to Marc who explained to me the way this works. The more I understand urxvt the more I like it. Like emacs is not an simple editor, urxvt it is not an simple terminal with a set of features, but an environment to run extensions (compared to emacs in a language I understand :-) ) which makes these pieces of software "indefinitely" useful also in the long run! Michael On Freitag 2014-12-26 16:17, kario tay wrote:
Date: Fri, 26 Dec 2014 16:17:20 From: kario tay <[email protected]> To: [email protected] Subject: urxvt, tabbedex, tmux: Opening a new tab and sending a command I've seen several other attempts at getting this to work. -- Attempt #1: Tabbdex Using the 'tabbedex' extension. -> https://github.com/stepb/urxvt-tabbedex/issues/12 This feature, however, has been removed by the tabbedex maintainers. The user eventually opted for a nested tmux setup instead. -- Attempt #2: new_tab() Earlier this year, Michael Traxler, a member of this list, asked how to "automate the setup of urxvt-perl-extenstions via scripts"; specifically, to open new tabs and change their names. -> http://lists.schmorp.de/pipermail/rxvt-unicode/2014q1/001911.html There were references to "$self->new_tab;" and "->new_tab (qw(-e /bin/zsh))", but no report of success from Michael Traxler (or anyone else). -- Attempt #3: new urxvt::term I've been working on starting a new urxvt window that will open several tabs. Each tab will run a command, like 'ls' to display a directory, or 'vim' to open an editor, etc. Opening a window is _almost_ working. The bug is that it opens three windows instead of one. Try this code snippet for yourself: #! perl sub on_start { my ($self) = @_; my $env = $self->env; new urxvt::term $env, "urxvt", -e => "sh", -c => "ls; exec sh" ; } And I don't know how that would lead to opening tabs in that window, with each tab running a separate command ('ls', 'vim', etc.). --- Have you successfully put these pieces together for yourself (or done something completely different to get the desired result)? After days of searching and experimentation, it still seems like no one has figured this out. A working example would help everyone who will ask this same question in the future, just as I and several others already have asked about and tried to do. It's a feature that seems to be easy for a fully scriptable terminal emulator like urxvt -- surprising that there's no clear answer yet. Hopefully an example can make things clear for anyone who wants to do something like this without resorting to nested tmux instances, or going back to their old terminal emulator due to the absence of a urxvt solution. Thanks in advance for your ideas...!
_______________________________________________ rxvt-unicode mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode
