
On Fri, May 17, 2013 at 01:05:55PM +1000, Toby Corkindale wrote:
On 16/05/13 13:50, Matthew Cengia wrote:
On 2013-05-16 12:27, Toby Corkindale wrote:
I just wondered.. are there any terminals*, plugins for terminals, or plugins for tmux, that will scan output and automatically send canned responses -- whilst still letting me interact normally the rest of the time?
And secondly -- are there any tools that will simply let me assign hotkeys or macros to be automatically typed upon being pressed?
That latter request seems simple, but I didn't get much joy when searching online for likely packages.
I can't speak for tmux, but for screen, I do things like the following in my .screenrc:
## Fancy regexp to grep out blank lines and comment lines bind ^g stuff '"^[[:space:]]*(#|$)"'
Which says "when I hit the screen escape key followed by ctrl+g, type "^[[:space:]]*(#|$)" (including quotes) into my current screen window.
Tmux may have an equivalent to this, assuming this is the sort of thing you're looking for.
Thanks - this totally covers one of the two things I was looking for. I can add to .tmux.conf:
bind-key C-h send-keys -l "hello world!\n" ^^^^^^^^
Hi Toby, What is send-keys? I couldn't find it on Google. Since you have send-keys, you may not need crikey http://www.shallowsky.com/software/crikey/ which provides the ability to assign a key shortcut to a string. The documentation for crikey has improved *a lot* since 0.5, but 0.8.3 is 4 years old now so the promised extras may not be coming any time soon. crikey was expected to be used in conjunction with the window manager to do the key binding, but there is another utility called Keylaunch which can do it for you instead. Do a keylaunch& at the start of your session and it will listen for bound keys (comes with example of binding Shift-Insert). Cheers ... Duncan. -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html