Re: [dev] [st] patch to send terminal to another program

From: pancake <pancake_AT_youterm.com>
Date: Fri, 26 Aug 2011 00:15:30 +0200

Isn't this what script does? I ported the netbsd implementation to all unixes for youterm.com it's called yt-script and records one file with output and another file for the timestamps and offsets.

I wanted to do a player with seeking support but .. Well i shutted down the site.. Because i had no time to maintain it.

If anybody wants to get on the project rewrite all the source is there.

On 25/08/2011, at 21:29, Jean-Paul DEUX <tuxg_AT_rocketmail.com> wrote:

> On 08/25/2011 03:40 PM, Nick wrote:
>> I think it would be really neat to be able to send all the
>> text in a terminal to an external program, to act on it as
>> it likes.
>>
>> I wrote a patch to do that, sending the contents of the
>> screen to the stdin of the chosen program.
>>
>> One good use for this is writing a script to find any links,
>> and offer to open them in a browser using dmenu. A
>> particularly crude version of this could be:
>>
>> #!/bin/sh
>> sed -e '/http/!d' -e 's/.*http/http/g' -e 's/ .*//g' | dmenu | xargs surf
>>
>> There are a couple of things which need fixing / could do
>> with some discussion:
>>
>> 1) At present I commented out the SIGCHLD handler, as it was
>> blocking the process from returning. I confess to not being
>> overly familiar with the finer points of forking, so hope
>> someone better than me can suggest a fix.
>>
>> 2) This could be a feature that people would find useful to
>> trigger several different scripts. At present the key
>> binding is hardcoded (meta-|); should we add something to
>> be able to better define keybindings in config.h?
> Wouldn't it be more suckless (or unix way?) to let a terminal multiplexer (who said tmux?) do that ?
> Espicially when it already do it.
>
> I use this in my tmux.conf for opening links (I think it's from arch wiki):
> bind o capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -k -n urls -t:0 'cat /tmp/tmux-buffer | urlview'
>
> tuxg
>
Received on Fri Aug 26 2011 - 00:15:30 CEST

This archive was generated by hypermail 2.2.0 : Fri Aug 26 2011 - 00:24:02 CEST